Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have foo.com which is set up as the alias of bar.com For better ranking etc I want search engines to only crawl foo.com How do I "remove" bar.com ?

Is it the same method as removing www (which I'll also be using) ? if so what's the code ?

share|improve this question
add comment

1 Answer

The best way is to 301 Redirect all requests for bar.com (or www.bar.com or www.foo.com) to foo.com using .htaccess or a similar method. Google will tell you how, or there are a few questions on this site.

You can also tell Google of a "change of address" through Google Webmaster Tools.

share|improve this answer
    
If google told everything stackexchange wouldn't exist. I found several example code to do each redirects but since I don't know mod_rewrite I don't know what the differences mean nor how to combine rules. –  user2534 Aug 4 '11 at 8:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.