Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Your Answer


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.