e premte, 21 shtator 2007

Redirects using HTTP 301 headers

The correct way to forward your domain name in this context is to use what is known as the HTTP 301 redirection header. The what? Let me explain...

The HTTP protocol defines a set of headers that allow the internet to function. HTTP headers are usually not seen by website visitors, but are part of the communication between the web server and the browser. They are called headers because they are exchanged before the web server sends the HTML page (or any other file) to the browser; that is, they appear at the head - beginning - of the HTML document.

A subset of the standard HTTP headers deal with redirection; these are called the 3xx headers (because they are numbered 300, 301, 302, and so on). The HTTP 301 header means that the web page has moved permanently, and it is always followed by another header defining the new location of the web page.

To everyone using the website now, including search engines, this means that the web page or domain name should no longer be used. Instead the new location should be used. Thus when a search engine comes across a forwarding, it automatically indexes it as the destination page; that is, the search engine now knows that www.domain.com and domain.com are the same thing.

Nuk ka komente: