Tuesday, April 2, 2013

How To Tell Google WebSite Has New Domain Without 301 Redirect

When I decided to get a domain name for  my website HTML Made Easy I faced the problem of how I was going to get Google to replace the old url with the new domain. Usually it's done with a 301 redirect but I didn't have that option because my site was located on the web space that came with my internet account. My site was already doing well in Google searches so I needed to find a way for Google to list the new domain instead of the old web address.

I did a bit of googling (well actually a lot of googling) and I found the solution - use canonical rel tags on the pages of the old site. The purpose of this tag is to give webmasters the option of telling Google which page they would rather see listed if they have 2 identical webpages. Take for  example a website selling shoes, one page may list the shoes by price while the other page lists them by brand. If Google crawls the webpage with shoes listed by price and sees the canonical tag pointing to the webpage listing shoes by brand, Google will know that the webmaster prefers the brand page be listed in search results and not the price page.

This is just what I needed and Google approved, within a couple weeks the new domain began replacing the old url in Google search results.

The canonical rel tag goes between the head tags of the webpages that are showing in search results but that you want replaced. This is what the canonical tag looks like:

<link rel="canonical" href="http://www.newdomain.com">

That code would be placed in index page, replace www.newdomain.com with the url of your new domain. All the other pages you want replaced in search results must contain the exact url  of the matching  webpages on the new domain:

 <link rel="canonical" href="http://www.newdomain.com/gallery.html"> 

It's important to note that the content of the new webpages must be identical to the webpages they are replacing. If they are not Google may think that the pages on the new domain are not a good match for the keywords under which the old pages are showing. You will find more information about the canonical tag on Google's support page.