301 Redirects to www.domain in IIS

Discussion in 'Site & Server Administration' started by eXe, Sep 18, 2006.

  1. #1
    Hi, I'd like to know how to set 301 redirects for all domains on a particular server running win2k3/iis6 so that all traffic to http://domain.com is redirected to http://www.domain.com.

    I found this solution but it doesn't appeal to me.

    I have ISAPI_Rewrite installed.

    Need advice:)
     
    eXe, Sep 18, 2006 IP
  2. notcon.seo

    notcon.seo Guest

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far as i am aware you need to add a c-name in the DNS settings, not necesarily a 301 for this problem.

    Go to this page on the Microsoft site:

    http://www.microsoft.com/technet/archive/winntas/deploy/setting.mspx?mfr=true

    Hope it helps buddy.
     
    notcon.seo, Sep 18, 2006 IP
  3. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #3
    Thanks notcon.seo, but won't that end up masking the domains (making two of each)?

    I'd really prefer to do it via ISAPI_Rewrite.

    I understand this would work:
    RewriteCond %{HTTP_HOST} ^yourdomain\.com
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]
    Code (markup):
    But I don't want to add an entry for each domain name... please help.
     
    eXe, Sep 18, 2006 IP
  4. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #4
    notcon.seo, do you have MSN or AIM?
     
    eXe, Sep 18, 2006 IP
  5. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #5
    IIS = mod_rewrite/.htaccess probably won't work.
     
    Nintendo, Sep 19, 2006 IP
  6. notcon.seo

    notcon.seo Guest

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The issue you have is that you are trying to get a cannonical url (non www) to redirect to the main url (www), in the dns settings you add a cname alias, the cname is the cannonical name thus if a user types in your cannonical url your server automatically redirects to the www version, so the user and search engines has no real idea of the cannonical non www existence.

    Well thats my understanding any way :)
     
    notcon.seo, Sep 19, 2006 IP
  7. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #7
    Yeah but I have ISAPI_Rewrite installed, & it says on their site that the syntax is very similar to mod_rewrite

    I tried this but it didn't work:(
    RewriteCond %{HTTP_HOST} ^yourdomain\.com
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]
    Code (markup):
     
    eXe, Sep 19, 2006 IP
  8. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #8
    Nintendo, Sep 19, 2006 IP
  9. notcon.seo

    notcon.seo Guest

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i am slightly confused exe, why do you want to do it with isapi so bad? just curious :)
     
    notcon.seo, Sep 19, 2006 IP
  10. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #10
    Otherwise wouldn't the cname records for each domain need to be altered...:(
     
    eXe, Sep 19, 2006 IP
  11. notcon.seo

    notcon.seo Guest

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    in short yes, every domain name that you have hosted on your servers, if you want them to should have a cname alias associated with them, if you are using a control panel such as helm or others you should be able to set it up to do this for you when you add a domain.

    I just feel that isapi is not the most efficiant way of doing it, as the cname dns alias is for that very purpose.
     
    notcon.seo, Sep 19, 2006 IP
  12. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #12
    Wrote to helicon support & got this done. Thanks anyway
     
    eXe, Sep 19, 2006 IP