You are here

Informing search engines about change in url

I recently changed my website address from rahul.ind.in to rahul.amaram.name due to some reasons. The biggest problem I was facing with this was that all my pages were previously indexed in Google with the website name rahul.ind.in. Though I re-submitted my new url to Google (http://www.google.com/addurl/), the rankings were still for the old url. And I couldn't find any way of contacting Google customer care / any method to inform of the change in the url.

While googling for a solution, I came across a page from which I realized that redirection can be used for this purpose. Further more I realized that if you redirect a page and send a 301 status response, it indicates to the application requesting the page that the page has moved permanently. This information is especially used by search engines such as Google to update the old site to the new site and make sure the ranking of the old page is not lost. I used the below code in Apache VirutalHost Section for setting up permanent redirection.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^rahul.ind.in$ [OR]
RewriteCond %{HTTP_HOST} ^www.rahul.ind.in$
RewriteRule ^/(.*) http://rahul.amaram.name/$1 [R=permanent,L]

The same method might be quite useful if you currently do not have a domain name but host a blog / site somewhere and plan to purchase a domain name for yourself later.

Category: 

Add new comment