Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Someone in the marketing department ran an SEO tool against our public website and found that about half of the links to our website go to www.mycompany.com, and half go to mycompany.com. Both of these go to the same IIS 6.0 web server. However, this apparently is bad for search engine optimization.

I've been reading up on 301 redirects which should fix this problem. However, when I follow the very simple directions, I get stuck in what appears to be an infinite loop.

Directions: IIS, under the website Properties on the "Home Directory" tab - use "A redirection to a URL", and put the proper address in... http://www.mycompany.com. When I go to the site after applying this change, I just get a rapid-fire loading bar in my browser, which sort of makes sense. Doesn't this redirect tell IIS to send the traffic to this new URL, which is in effect, itself?

Here is a sample tutorial with screenshots: highposition.net/301-redirect-tutorial-iis/

Any help would be much appreciated!

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

You should define two websites in IIS; one should be a "dummy" site that only answers to "company.com" and redirects to "www.company.com", and the other should be your "real" site that answers to "www.company.com".

you can't do both on the same site using IIS redirection, or you'll be stuck in an infinite loop (as you already noticed).

share|improve this answer
1  
That seemed to do the trick! I made both sites have the same IP address and port number. I gave the 'dummy site' a host header of 'mycompany.com'. I also set the home directory to be "A redirection to a URL" of 'mycompany.com';. I also checked the radio button for this to be a 'permanent redirection to this resource'. The original site does NOT have a host header, so I guess it's picking up any host header that is not specified by other sites. Thank you for your assistance! –  DBA_0point5 Sep 21 '09 at 18:01
    
+1 for being incredibly useful. –  Matt Lacey Nov 9 '09 at 17:07
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.