I have been developing a new site the past year on the IP address assigned by my hosting company. I have not yet directed this IP address to a domain name. Recently, I did a Site:http://184.108.40.206 search on the IP address and found 400 folders and pages indexed by Google. Many of these pages were just test pages or part of the site structure which we deleted during the site's development. (I think Google picked up these addresses through my use of the G-toolbar)
Now that I'm ready to go "live" with the site I'm concerned about a potential dup content risk when I direct the IP address to the domain name. Will Google find the identical content on "two" sites and penalize the newer (domain-named) version? What should I do?
I was thinking of changing web hosts which would give me a new IP address for the beta site. Then I would put in a site removal request for all the older (soon to be invalid) IP pages which Google incorrectly indexed. I'm hoping that Gbot will go to the old IP address and not find any pages there and remove the cached pages from the Supplemental index. Once that is taken care of, I'd direct the new IP address to the domain name.
Is this the correct approach? What problems can you foresee if I do this?
Thanks for the code, Brett- I knew about the re-write, my question related more to the dup content issues and I was looking for a conservative approach (I don't completely trust 301 rewrites which I'm not sure are being handled correctly)
I found a new host (with better stats and CMS handling) and am in the process of setting up the content on a new IP. Before I set the dns (launch) I will remove the content from the old IP and put in a url removal request.