1

I was just hoping someone could point me in the right direction. I want to have my website hosted which I want to display as www.mydomain.com I also need mydomain.com and blog.mydomain.com to go to the same IP.

Do I need to create:

  1. 1 x AName record for www.mydomain.com which points at my server static URL

  2. Then create 2 x CName records which both point at www.mydomain.com

?

Because if thats the way it's done then I want to set a redirect up on my IIS server to 301 to www.mydomain.com if it sees the URL as mydomain.com.

Does this sound okay?

migrated from superuser.com Sep 16 '13 at 18:17

This question came from our site for computer enthusiasts and power users.

3
  1. You should set three A records poiting to your server IP.
    • *.mydomains.com
    • www.mydomain.com
    • blog.mydomain.com
  2. Then you need to set up your Virtual Host correctly to accept requests for all three domains/subdomains (see e.g. Virtual hosting with IIS (Internet Information Services) or Setting Host Headers in IIS 6.0).
  3. Redirect needed domains to one desired domain using URL Rewrite module and 301 redirect (e.g. both www and blog to mydomain.com) so you don't have "duplicate" content.
  • What is wrong with using CNAME? – Paul Sep 16 '13 at 20:32
  • 4
    I wouldn't say wrong, BUT: 1) two DNS queries instead of have to be done, 2) it might get a bit confusing e.g. with MX records (might not work as expected :-)), 3) and most important: Canonical Name is an alias, so if you type alias into the browser (e.g. with WWW) it won't change to non-WWW version, which might not be the best behavior (e.g. for SEO reasons). – David Lukac Sep 16 '13 at 20:56
0

Yes. You may find the Wikipedia article on CNAME informative.

  • "Yes" and a link is not an answer - it's a comment. Please view the FAQ's for this site on Answers. – dan Sep 17 '13 at 6:40
  • 1
    Link only answers are not appropriate. Links break, information on other sites goes away. Please either explain in your own words what the other site says or use a blockquote from the other site. – Stephen Ostermiller Sep 17 '13 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.