3

I have a website that I made for a friend who runs his own business.

I designed and built the website for him and then hosted it on MY hosting package and URL - Lets call this URL 1.

He was happy with everything so he then bought hosting and I gave him all the files and he put them on his hosting package and URL - lets call this URL 2.

Now, I added a few keywords and meta data to the head tags of his pages and when it was on URL 1, I got quite a few friends to test the site (giving the site hits).

Now I have transferred the site to URL 2, when ever any one googles it, it will display URL 1 - even though URL 1 does not have any of the content for the site on it anymore.

What do I do to get google to display URL 2, not URL 1?!

Any help would be appreciated, the meta data I added is as follows:

 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <meta http-equiv="language" content="English">
 <meta name="author" content="Jon Kyte">
 <meta name="description" content="Tom Frost is a personal trainer, competitive natural body builder and nutritionist operating out of Leeds city centre">
 <meta name="keywords" content="Tom Frost, Leeds, personal trainer, personal training, qualified fitness instructor, freelance personal trainer, training, natural body building, nutrition">

If anything I have described is unclear, please let me know and I will try my best to explain, but this is really important as he needs his customers to find him on google!

Thanks in advance

Jon

4
  • Not programming related. Voting to migrate to webmasters.
    – Oded
    Commented Apr 18, 2011 at 20:22
  • 2
    Give google some time to update their cache
    – Niklas
    Commented Apr 18, 2011 at 20:23
  • Ok sorry for posting on the wrong site, I get confused some times. Niklas, just quickly, how long does this take usually, any ideas? will that be the only problem do you think?
    – Jon Kyte
    Commented Apr 18, 2011 at 20:30
  • You could sing up to Google webmaster tools and submit the site there, it will give the search engine a nudge. Commented Apr 18, 2011 at 21:24

2 Answers 2

6

If URL 1 and URL 2 are different, then Google is not simply going to start showing the new URL. You have to let Google know of the change in order for them to update their listings. To do this, you will need to use 301 redirects from the old pages to the new so Google can update their URLs.

Assuming you are in a LAMP hosting environment, you need to add one of these for each page in the site to the HTACCESS file in the domain root directory.

redirect 301 /old.htm http://www.URL2.com/new.htm

If your server is a Windows/IIS server, then you will need your host to help you with the redirects.

2
  • If you have not re-pointed your domain in DNS (URL1) you may have to set-up the 301's on your server and point to the new domain from there. Commented Apr 18, 2011 at 21:27
  • Correct, I should have been more clear, the redirects will need to be on URL1 for Google to follow them. Commented Apr 19, 2011 at 0:51
2

You will want to do a 301 redirect. Also, get a Google Webmaster Tools account (it's free) so that you can monitor how Google indexes the new url. It can take quite a while for Google to remove the old url from its index without a 301 redirect. If you don't do a 301, everything will eventually get ironed out and search will start bringing up the new url, but by doing a 301, you make things a billion times easier.

In the future, you may want to put a robots.txt in when testing a site on a url in order to prevent the search engine from crawling and indexing it so that you don't run into this problem again. Then, when you move the stuff to the new url, the content will still all be new to Google.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.