none
How to Configure DNS to Redirect domain.com to www.domain.com RRS feed

Answers

All replies

  • If domain.com is the name of your AD domain, then you should NOT be using it as an HTTP URL from an internal network. Simply communicate to your internal users to start using http://www.domain.com

    If this concerns access to your external web site, make sure that domain.com resolves to the same IP address (or set of IP addresses) as www.domain.com (http://www.domainhelp.com/2010/04/how-do-i-point-www-domain-com-at-domain-com-or-vice-versa/) or use the Web server redirection functionality (http://www.webpronews.com/topnews/2005/09/28/how-to-set-up-a-redirect-on-iis-nonwww-domain-name-to-www-domain-name)

    hth
    Marcin

    Friday, July 9, 2010 1:19 PM
  • Hello

    In addition to what Marcin said, you can also create an A record in DNS www.domain.com to point to the hosting server ip address.


    Isaac Oben MCITP:EA, MCSE
    Friday, July 9, 2010 1:47 PM
  • If you are running Active Directory and your internal AD and External domain name are the same, you can still work around this issue.

    Active Directory Domain Name Considerations when Using the Same Internal and External Domain Name
    http://www.anitkb.com/2010/03/active-directory-domain-name.html

     


    Visit: anITKB.com, an IT Knowledge Base.
    Friday, July 9, 2010 2:41 PM
  • Hi Christopher,

    If 'domain.com' is the AD DNS domain name, I agree with the others, especially Marcin that you would want to instruct users to use the 'www' in front of it. DNS doesn't offer any redirection per se, but you can create a www record with the IP address of the internal webserver, as was already suggested.

    With setting something up with websites, many refer to the 'domain.com' record (without the www), as the 'blank domain entry' but with AD, it's actually a necessary record that each domain controller registers. It's called the LdapIpAddress. GPOs, DFS, and other domain functions use this record, so it's something that you don't want to alter. Matter of fact, the Netlogon service, which registers/creates this entry, will re-register it on a periodic basis. You don't want to alter it.

    Keep in mind, if you have more than one DC, when you type in http://domain.com, or even using nslookup, you will notice that the responses will rotate between the multiple entries. Since you are asking to redirect http://domain.com, which is the LdapIpAddress, there is one other possibility to help with the multiple records, but it has to be one on EACH domain controller. Install IIS on each domain controller. In IIS on each DC, configure a redirection to www.domain.com. This way no matter which DC it hits, it will redirect it to your www record under domain.com.

    However, the one thing I see about IIS is that it is a security risk to be on a DC, and it's one thing I normally try to avoid. However, if the users are adamant about not typing in www, then this is the one method that will work.

    Did you know if you type in "domain" (without the quotes) in a browser, and hit the Ctrl then Enter keys, that the browser will automatically change it to www.domain.com?

    Ace


    Ace Fekay, MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003, Microsoft Certified Trainer, Microsoft MVP - Directory Services. This posting is provided AS-IS with no warranties or guarantees and confers no rights.
    Friday, July 9, 2010 3:54 PM
  • If your AD name is exactly the same as your external web site then you can't do it.  AD reserves and uses the domainname.com and there is nothing that can be done about it.

    If the names are different and you are looking to just redirect then use host headers on your IIS server.

    --
    Paul Bergson
    MVP - Directory Services
    MCITP: Enterprise Administrator
    MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    2008, Vista, 2003, 2000 (Early Achiever), NT4
    Microsoft's Thrive IT Pro of the Month - June 2009
    http://www.pbbergs.com    Twitter @pbbergs

    Please no e-mails, any questions should be posted in the NewsGroup This
    posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 9, 2010 3:56 PM
    Moderator
  • Thank you all for the information. We have different internal and external domains. The external domain is the one I need to set up this record. Outside of our business http://domain.com works fine, but inside our firewall, it doesn't. There are no domain controllers supporting the external domain. How do I caonfigure DNS in this senario to point to the web server at http://domain.com from inside the firewall?

    Thanks!

    Christopher

    Tuesday, July 13, 2010 1:09 PM
  • Forward queries for domain.com to external DNS server or use either of the methods described in (http://www.domainhelp.com/2010/04/how-do-i-point-www-domain-com-at-domain-com-or-vice-versa/)  to configure your internal DNS

    hth
    Marcin

    • Marked as answer by Bruce-Liu Wednesday, July 28, 2010 7:27 AM
    Tuesday, July 13, 2010 1:13 PM
  • Thank you all for the information. We have different internal and external domains. The external domain is the one I need to set up this record. Outside of our business http://domain.com works fine, but inside our firewall, it doesn't. There are no domain controllers supporting the external domain. How do I caonfigure DNS in this senario to point to the web server at http://domain.com from inside the firewall?

    Thanks!

    Christopher


    Hi Christopher,

    To complement Marcin's post, please also take a look at my blog on how to configure this scenario.

    Split Zone or no Split Zone - Can't Access Internal Website with External Name
    http://msmvps.com/blogs/acefekay/archive/2009/09/04/split-zone-or-no-split-zone-can-t-access-internal-website-with-external-name.aspx

    I hope you find it helpful.

    Ace


    Ace Fekay, MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003, Microsoft Certified Trainer, Microsoft MVP - Directory Services. This posting is provided AS-IS with no warranties or guarantees and confers no rights.
    Tuesday, July 13, 2010 2:52 PM
  • If you are hosting a DNS zone outside of your network to support the external name, then you really shouldn't have to do any thing extra from inside of your network to resolve hostnames from that zone.  Your internal DNS servers will either use the "Root Hints" file or "Forwarders" to resolve records in the external domain.

    You can also set up your DNS servers to do "Conditional Forwarding" for that specific domain name.

    Configuring DNS Conditional Forwarding in Windows Server 2003

    Configuring DNS Conditional Forwarding in Windows Server 2008

    *** Note-- I have noticed that there are some referrences in this thread to inherit problems when having the same internal and external name.  While that is true, there are supported work arounds.  If you read my blog (link above), I have summarized the solution which was provided to me by Microsoft Premier Support.  While the solution may not be applicable to every AD implementation, most will support it.


    Visit: anITKB.com, an IT Knowledge Base.
    Tuesday, July 13, 2010 2:57 PM
  • Ace,

    I think the part about creating a blank A record with the IP address of the web server is what I'm looking for. There are no DCs for our external domain and I have tried to ping just the domain name and it couldn't be resolved, so I should be good to create the record. Thanks for your help!

    Wednesday, July 14, 2010 1:37 PM
  • Ace,

    I think the part about creating a blank A record with the IP address of the web server is what I'm looking for. There are no DCs for our external domain and I have tried to ping just the domain name and it couldn't be resolved, so I should be good to create the record. Thanks for your help!


    Christopher,

    Glad to hear I as well as all of us here, were able to help.

    Ace


    Ace Fekay, MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003, Microsoft Certified Trainer, Microsoft MVP - Directory Services. This posting is provided AS-IS with no warranties or guarantees and confers no rights.
    Wednesday, July 14, 2010 3:38 PM
  • I was trying to do a similar thing - ensure that content seen at http://domain.com was the same as at http://www.domain.com.  I had two websites running on one cloud server with one IP address and my www.domain2.com was working fine but http://domain2.com was showing domain1 content.  I opened the IIS on my Windows Server 2008 selected the site, right clicked to access 'Edit Bindings' and added a second binding to make sure that the second domain had a binding to here http://domain2.com in addition to the www binding.  

    This was the  article I used: http://www.simpledns.com/kb.aspx?kbid=1296.

    It's not exactly a redirect but solved the problem of it showing the right content for me.

     

    Tuesday, February 15, 2011 11:11 AM
  • The question in the thread regarded how to create the necessary DNS records to resolve the http://domain.com name, not necessarily how to configure a webserver to respond to different names.

    However, to comment on your post, and this is more of "hostheader" configuration question - I would suggest to configure the 'hostheader' variable correctly for each website on the web server, such as configuring 'domain1.com and 'www.domain1.com' under the Domain1 Website in IIS, and configuring 'domain2.com' and 'www.domain2.com' under the Domain2 Website in IIS so they appropriately respond to the inbound requests based on the URL that was typed into the browser by the user.

    Ace


    Ace Fekay
    MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services

    This posting is provided AS-IS with no warranties or guarantees and confers no rights.

    Tuesday, February 15, 2011 4:40 PM
  • Hi Christopher,

    When the internal AD domain name matches the external domain the only solution is to setup a website in IIS on each domain controller with HTTP redirection.

    -   Create an A record in DNS for www which points to the IP address of the web server

    -   Create a blank website on each domain controller with a host header of yourdomain.com and enable a HTTP redirect on the website pointing to http://www.yourdomain.com

    Mark

    Tuesday, January 29, 2013 4:21 AM
  • You should not redirect to domain.com to www.domain because it will be looks like duplicated content. see an example below:

    Be careful. Your website without www doesn't redirect to www (or the opposite). It is duplicate content!

    Be sure that www.incirclemedia.com and incirclemedia.com are not running in parallel.

    Redirecting requests from a non-preferred hostname is important because search engines consider URLs with and without "www" as two different websites.

    Once your preferred domain is set, use a 301 redirect for all traffic to your non-preferred domain.

    Monday, September 23, 2013 5:54 AM