Forum Moderators: open

Message Too Old, No Replies

Setting up Sub-Domains in IIS

Duplicate content issues?

         

pageoneresults

11:23 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm working on a site that is hosted in a Windows environment and I now need to set up a few sub-domains. I've already configured IIS and have set up the sub-domain but I've noticed that I can browse to both the sub-domain and the sub-directory paths. Should IIS be automatically doing something to prevent browsing to the sub-directory?

For example, I can browse to both URIs...

[name.example.com...]
[example.com...]

Should I incorporate a 301 for [example.com...] and send it over to the [name.example.com...] I just want to make sure I do this correctly without any ill effects. ;)

CaseyRyan

11:39 pm on Dec 1, 2004 (gmt 0)

10+ Year Member



It looks like you've setup your subdomain name.example.com to have a home directory under the home directory of the www.example.com site. You need to just separate out the home directories and you should be good to go.

ie:
"name.example.com" has home directory of "c:\inetpub\name\"
"www.example.com" has home directory of "c:\inetpub\www\"

Here's some more caveats with subdomains:
You should set them up as separate websites in IIS.
When setting up the separate websites, you'll have to decide whether to have unique ip addresses or to use IIS's host headers. You might have already gotten past this.

-=casey=-

pageoneresults

12:24 am on Dec 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks CaseyRyan! I now have a better understanding of this. Unfortunately moving the sub-domain outside of the root prevents editing of those sub-domains through FrontPage which of course is my editor of choice.

I'm working with my Server Admin to see what we can do to work around some of the issues that are cropping up when using sub-domains in the type of environment I am used to working in.

You should set them up as separate websites in IIS. When setting up the separate websites, you'll have to decide whether to have unique ip addresses or to use IIS's host headers. You might have already gotten past this.

We decided to do this through our Helm interface and it worked like a charm. Helm assigns the IP automatically.

CaseyRyan

12:29 am on Dec 2, 2004 (gmt 0)

10+ Year Member



If you are using some kind of serverside script (PHP or ASP) you coul check the root url and redirect appropriately.

Pseudocode would be:
If the url contains "www.example.com" then
replace "www.example.com" with "name.example.com" and redirect to that new url.

This would be pretty seamless to the user and could be accomplished with an include or global function.

thought about this more:
if the name.example.com has to have it's home directory under the home directory of the www.example.com site.

Under the configuration for www.example.com you can create a virtual directory named "name". Make this virtual directory permenantly redirect to name.example.com. I believe that this would be better from an SEO perspective. I believe that the permenant redirect is the same as the 301 redirect which answers an issue in your original post about the duplicate content.

pageoneresults

3:47 pm on Dec 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I believe that the permenant redirect is the same as the 301 redirect which answers an issue in your original post about the duplicate content.

Thanks again Casey. We're going to be testing all of this over the next week or so. In reference to the 301's, we utilize ISAPI_Rewrite so a quick entry in my .ini file and we've addressed the dup content issue. I just wasn't sure if IIS should do this by default. Since I'm not a Server Admin, I'm a little lost there. But, my Server Admin completely understands what you've stated so far.

ISAPI_Rewrite 301...

RewriteRule /name/ http://name.example.com/ [I,O,RP,L]