Forum Moderators: open

Message Too Old, No Replies

301 redirect with windows iis

         

colthuis

5:45 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



Ok, so I know how to redirect individual pages with windows iis. What I don't know how to do is redirect the canonical domains. Is it possible to redirect domain.com to www.domain.com? It also seems the webmaster has setup so the site works with https:// as well. The problem I'm having is the SE's are indexing all these pages.

Thanks.

carguy84

6:56 am on Apr 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, you have to handle this in the code. IIS redirects with a 302 redirect.

Chip-

Bluesplinter

11:20 am on Apr 7, 2006 (gmt 0)

10+ Year Member



IIS redirects with a 302 redirect.

IIS can also redirect with a 301. For the "redirecting" website in IIS, on the Home Directory tab, select the "This is a permanent redirection for this resource" option, and you'll be all set.

Here's a test with Brett's Server Header Check, that shows first without, then with that option checked:

HTTP/1.1 302 Redirect
Content-Length: 150
Content-Type: text/html
Location: [remainder removed for brevity]

HTTP/1.1 301 Moved Permanently
Content-Length: 150
Content-Type: text/html
Location: [remainder removed for brevity]

picassoxw

2:26 pm on Apr 16, 2006 (gmt 0)

10+ Year Member



you can response a 301 redirect by asp

Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.niceidea.org/"
Response.End

defanjos

5:04 pm on Apr 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look into isapi_rewrite