Sunday, 18 October 2015

What is htaccess file ? why htaccess file is used ?

 


A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration.

Htaccess files are hidden plain text files that are on the server to help control how your visitors interact with your website. The htaccess file is also used to block specific traffic from being able to view your website. If you look for your .htaccess file you'll see that there's no filename. The extension is .htaccess which tells the server what type of file it is. In cPanel you can see if you have a current .htaccess file using file manager but you will need to make sure you have selected to view hidden files. If you are not familiar with using file manager please read our article.  To view hidden files in file manager, select the 'file manager' icon in cPanel and make sure the box is checked next to 'Show Hidden Files.' Then click 'OK' and you will be able to view hidden files.

What can you do with a .htaccess file?

You might have a private area of your website you wish to keep password protected. This password protection is actually set up in the .htaccess file. Most of the functions of the htaccess file, you do not have to concern yourself with as they will be automatically written through cPanel. This is the case of password protecting directories. While you set it up in cPanel, it actually writes a directive to your htaccess file. 


Other functions of the htaccess file include, prohibiting hotlinks, rewriting URLs, setting default pages, creating redirects, reconfiguring account settings, and much more. It's really important to realize how the htaccess file can affect your entire account. Changing something in the htaccess file can alter how your website functions so it's really important BEFORE making changes to your htaccess to backup your current htaccess file.


Five Common Uses for an .htaccess Page




1. Mod_Rewrite: one of the most useful facets of the .htaccess file is mod_rewrite. You can use the space in the .htaccess file to designate and alter how URLs and web pages on your sites are displayed to your users. You can find the entire tutorial on how to do this here.

2. Authentication: Although using the .htaccess file does not require as many permissions as accessing the apache2.conf file would require, we can still make effective changes to a site. Once such change is to require a password to access certain sections of the webpage.
The .htaccess passwords are kept in a file called .htpasswd. Go ahead and create and save that file, being sure to store it somewhere other than the web directory, for security reasons.
You should use the space inside the .htpasswd file to write in the name and passwords of all the users that you want to have access to the protected part of the site.
You can use this useful site to generate the username and encrypted password pair. If the username of your authorized user is jsmith and password is “awesome”, the pair would look like this: jsmith:VtweQU73iyETM. You can paste as many lines as needed into the .htpasswd file, but be sure that every user gets their own line.
Once you are finished with the .htpasswd file, you can type this code into the .htaccess file to begin using the password function:
AuthUserFile /usr/local/username/safedirectory/.htpasswd AuthGroupFile /dev/null AuthName "Please Enter Password" AuthType Basic Require valid-user
  • AuthUserFile: This line designates the server path to the .htpasswd file.
  • AuthGroupFile: This line can be used to convey the location of the .htgroup. As we have not created such a file, we can leave /dev/null in place.
  • AuthName: This is text that will be displayed at the password prompt. You can put anything here.
  • AuthType: This refers to the type of authentication that will be used to the check the passwords. The passwords are checked via HTTP and the keyword Basic should not be changed.
  • Require valid-user: This line represents one of two possibilities. “Require valid-user” tells the .htaccess file that there are several people who should be able to log into the password protected area. The other option is to use the phrase “require user username” to indicate the specific permitted person.
3. Custom Error Pages: the .htaccess file additionally allows you to create custom error pages for your site. Some of the most common errors are:
  • 400 Bad Request
  • 401 Authorization Required
  • 403 Forbidden Page
  • 404 File not Found
  • 500 Internal Error
To make a page look friendlier and to provide more information to the site visitor than the default server error page offers, you can use the .htaccess file to create custom error pages.

I’m going to create a 404 page in this tutorial. However, you can substitute that error for whatever you prefer: 

Once you have created and uploaded desired error page, you can go ahead and designate its location in the .htaccess file.

ErrorDocument 404 /new404.html

Keep in mind that the Apache looks for the 404 page located within the site's root. If you placed the new error page in a deeper subdirectory, you need to include that in the line, making it look something like this:

ErrorDocument 404 /error_pages/new404.html

4. Mime Types: In cases where your site features some application files that your server was not set up to deliver, you can add MIME types to your Apache server in the .htaccess file with the following code.

AddType audio/mp4a-latm .m4a

Be sure to replace application and file extension with the Mime Type that you want to support.

5. SSI: Server Side Includes are a great time-saver on a website. One of the most common uses of SSI is to update a large number of pages with some specific data, without having to update each page individually (for example, if you want to change a quotation at the bottom of a page).

To enable SSI, type the following code into your .htaccess file.

AddType text/html .shtml 
AddHandler server-parsed .shtml

These three lines have the effect of telling the .htaccess that .shtml files are valid, with the second line specifically making the server parse all files ending in .shtml for any SSI commands.
However, if you have many .html pages that you are not eager to rename with .shtml extensions, you can use another tactic to parse them for SSI commands, the XBitHack.
Adding this line to the .htaccess file makes Apache check all the html files with the appropriate permissions for Server Side Includes.


 

What is site links in web master tool ?







 Sitelinks

The links shown below some of Google's search results, called sitelinks, are meant to help users navigate your site. Our systems analyze the link structure of your site to find shortcuts that will save users time and allow them to quickly find the information they're looking for.


We only show sitelinks for results when we think they'll be useful to the user. If the structure of your site doesn't allow our algorithms to find good sitelinks, or we don't think that the sitelinks for your site are relevant for the user's query, we won't show them.


At the moment, sitelinks are automated. We're always working to improve our sitelinks algorithms, and we may incorporate webmaster input in the future. There are best practices you can follow, however, to improve the quality of your sitelinks. For example, for your site's internal links, make sure you use anchor text and alt text that's informative, compact, and avoids repetition.



If you think that a sitelink URL is inappropriate or incorrect, you can demote it. Demoting a URL for a sitelink tells Google that you don't consider this URL a good sitelink candidate for a specific page on your site. Google doesn't guarantee that demoted URLs will never appear as a sitelink, but we do consider a demotion a strong hint that we'll try to honor when generating sitelinks.

What is back links ? How Many types of back links?





Backlinks, also known as incoming links, inbound links, inlinks, and inward links, are incoming links to a website or web page. In basic link terminology, a backlink is any link received by a web node (web page, directory, website, or top level domain) from another web node.

Important Statistics of a website


1.Backlinks : Back links are nothing but the links of yourWebPages in other websites.(reference)
It can be either in the form of text links or images.
The syntax of back links is as follows :
Link syntax:<a href=" WEBSITE_URL ">KEYWORD</a>

Ex: <a href=http://freeseotips.in>free seo tips</a>


The website url can be the home page or any page of your site

and The keyword should always be your own keyword of your


webpage, for which you want the top ranking in search engines.


Do you get back links from google search engine as your site is


displayed in the search results?

The number of back links of your website denotes the number of


WebPages where your website (or webpage) address is mentioned.


More the number of back links better it is for SEO.

Infact 80% of SEO is dependent on Backlinks.


Backlinks are of two types:

Do follow : These are the backlinks in which there is direct


reference to your site.


No follow : These are the backlinks where there is no direct


reference to your site, in other words the url is encrypted here.


Both the backlinks are equal in value and have same importance


in SEO but, do understand that by default search engines links


are NO FOLLOW links that bring zero value in SEO.


By default all the search engine backlinks are


no-follow that have 0 value, meaning they are not considered as

backlinks.


To know whether a link is do-follow or no-follow just scroll over


mouse over the link and see the status bar, if you find your


webpage url then it is do-follow link, if it is encrypted then it is


no-follow link.


Try to acquire as many do follow links as possible for your


website.


Each Backlink has got variable values.


Quality Back links to Get Top Place


1.Backlinks from high PR (Page Rank) websites have very high

value.


2.Backlinks from your competitors websites have very high value.


3. Backlinks from low 'external links' websites have very high


value.


4.Virgin Backlinks have very high value.


5.Backlinks from different domains have higher value than


backlinks from the same domain.


6.The backlinks from .gov, .edu and .org websites have higher


value.


7. backlink from only related sites.(pages)

note : In backlinks, quantity does not matter, what matters is the

quality.

To check backlinks for any website you can visit the url: backlinkwatch.com


what is google settings in google analytics ?




This tool gives us the statistics of the traffic for our website, with

the help of this tool, you can know the details of the traffic such

as:

1. Source of the traffic (Search engines, Reference sites, Direct)

2. Keywords in search engine that bought the visitors to our site.

3.Region of traffic.

4.Browsers from which the traffic has come.

5.Avg. time spent by the visitor in our site.

6.Avg. number of pages visited by the visitors.

7.Search Engines from where the traffic has come etc...

The google analytics tool is present at the address www.google.com/analytics.


You can add as many sites as possible with just 1 google

analytics account.

Adding your website in google analytics

Sign up then login, in the login area click on ' add a profile ' ,

then give your website address, click on 'finish', copy the tracking

code shown in the text box and paste in between the <head> and

</head> tags of your website's homepage.

Get back to google analytics and click on 'save and finish'. This

would add your site to google analytics over a short period of

time.

This area is generally used to measure the statistics of the

website, the three important areas in this are:

1.Avg. Time spend by the user - should be as high as possible.

2.Avg. No. of pages visited by the user - should be as high as

possible.

3.The Bounce rate - should be as low as possible.

Bounce rate is nothing but the number of 100 avg visitors who

have left your site after reading just 1 page, that is they did not

navigate to other pages of your website.

Difference between Webmaster tools and Google analytics?

Google Webmaster tools gives the statistics of SEO while Google

Analytics gives the statistics of Traffic to your website.

Saturday, 17 October 2015

What is RSS feeds ? Why use Rss feeds ?



RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it.

RSS is all about simplifying the way we view and digest content on the Internet. Web pages are typically multimedia experiences, with multiple columns of images, text, and advertisements. An RSS feed of a page strips the information down to the bare essentials — usually the main text content, main images, or in the case of podcasts and video channels, the content itself.


The problems with bookmarking


  • You as the web surfer had to do all the work
  • It can get complicated when you are trying to track many websites at once
  • You miss information when you forget to check your bookmarks
  • You end up seeing the same information over and over again on sites that don’t update very often



RSS Changes Everything

What if you could tell a website to let you know every time that they update? In a sense, this is what RSS does for you.

RSS flips things around a little and is a technology that provides you with a method of getting relevant and up to date information sent to you for you to read in your own time. It saves you time and helps you to get the information you want quickly after it was published.

RSS stands for ‘Really Simple Syndication’. Many people describe it as a ‘news feed’ that you subscribe to.

I find the ‘subscription’ description helpful. It’s like subscribing to a magazine that is delivered to you periodically but instead of it coming in your physical mail box each month when the magazine is published it is delivered to your ‘RSS Reader’ every time your favorite website updates.

How RSS actually technically works is probably a lesson for another day but the key today is for you to understand why it’s good and how to use it.

Let me say right up front that I’m not the most technically savvy guy going around – but even I can use RSS. At first I found it a little strange to make the change from bookmarking to RSS but I found that when I started that I just couldn’t stop.

How to Use RSS

Get an RSS Reader – The first thing you’ll want to do if you’re getting into reading sites via RSS is to hook yourself up with an RSS Feed Reader.

There are many feed readers going around with a variety of approaches and features – however a good place to start is with a couple of free and easy to use web based ones like Google Reader and Bloglines. Either one will do if you’re starting out (I use Google’s Reader) – as I say there are many others to choose from but to get started either of these are fairly easy to use and will help you work out the basics of RSS.

Both of these feed readers work a little like email. As you subscribe to feeds you’ll see that unread entries from the sites you’re tracking will be marked as bold. As you click on them you’ll see the latest update and can read it right there in the feed reader. You are given the option to click through to the actual site or move onto the next unread item – marking the last one as ‘read’.

The best way to learn how to use either Google Reader or Bloglines is to simply subscribe to some feeds and give it a go. Both have helpful help sections to get you up and running.

Note: other options to tracking websites that you might already be familiar with include using pages like MyYahoo, MyGoogle and MyMSN.




Thursday, 15 October 2015

What is XML site map ?



An XML sitemap is a document that helps Google and other major search engines better understand your website while crawling.

Sitemaps are a protocol that allows the webmaster for a website to inform Google and other major search engines about URLS on a website that are available for crawling. Sitemaps allow search engines to find all of your webpages, that they might otherwise miss when indexing. The XML sitemap allows you to specify additional information about each URL such as:

  • When it was last updated 
  • How often the site changes 
  • How important the page is in relation to other pages on the site
Having this information within one document helps search engines understand your website and crawl it more intelligently. Sitemaps are an inclusion protocol, where Robots.txt files are exclusionary. For more information on robots.txt files please read our article.

XML Sitemap

Generating a XML sitemap for you website is a simple process, and there are many websites that can help you do so. Google recommends using http://xml-sitemaps.com
XML sitemap genarator

Create an XML sitemap that can be submited to go Bing, Yahoo, and other search Engines to help the crawl your website better.

What is HTML site map ?


The HTML sitemap (or site map) is concept that might be foreign to many folks who create a new website.


For search engine optimization (SEO) or website navigation purposes, the HTML sitemap is an integral piece of content that can guide people around your website. For more information about the HTML sitemap and where and why to use it, keep reading!

The HTML sitemap is NOT the XML sitemap. With an XML sitemap, this is automatically generated by WordPress and allows for better crawling by Google. In response, with a WordPress website automatically has an edge over non-WordPress websites by default.
The HTML sitemap takes the navigation layout of your existing website and breaks it down in a basic form.

Why use an HTML Sitemap?

The HTML site map is effective for accessibility, navigation, and internal linking purposes.
It is always nice to have more internal links on your website. What an HTML site map does is essentially create a page that links to all of your internal pages. This is good for increasing SEO on a smaller level, since it places more internal links on your pages and in turn improves your domain and page authority.

But there are also plenty of considerations to make when thinking about the usability experience of a website. Imagine that a customer comes into the site and imagine that this same customer is also color-blind. Maybe the layout of colors and design makes it so that it is difficult to navigate the website.

Maybe your design simply sucks and is hard to use!

In either case, the HTML sitemap provides an alternative to typical navigation on the website.

How to make an HTML Sitemap

On WordPress, making an HTML sitemap is as simple as creating a page and typing whichever links you would like on the site. You can make a sitemap that includes blog posts, helpful resources, or simply a site map that goes over the basic “parent navigation” items from your website’s menu.

From there, you simply link each piece (perhaps in bulleted form) to the proper content of that page. For example, if your About page is yourwebsite.com/about, that is the link you want to use in the site map.

Where do you put an HTML Sitemap?

The HTML sitemap will typically go in one (or both) of two places.

THE 404 PAGE
The 404 page is a perfect opportunity to provide help to someone who might be lost. Obviously, if the customer is on the error (404) page, then he/she clicked on the a bad link or guessed at a URL and got it wrong. Placing the site map on your 404 page allows the user to say, “Oh!! Here is a link to the page I was looking for!”

Our themes and designs automatically generate an HTML site map in the 404 page, but this is NOT default functionality of WordPress.
THE FOOTER
You can also create a separate page like mentioned above and link to it from the footer of the site. For “boring” pages like contact, accessibility, and site maps, people will typically look to the bottom of the page for answers.
map of the site 
accessibility