DNS Settings for Website

PeterNairn used Ask the Experts™
Hi, I have built a new Windows Server 2016 and the domain name is the same as the companies website i.e. mycomany.com therefore when they try to browse to www.mycompany.com it redirects to their Windows Server instead of going to their external website. I have added an A Record for www.mycompany.com in the DNS pointing to the external website but receive access to my company.com as denied, it also removes the www. I have it working on PCs by changing the hosts file but need it working from the Server for iPhones etc.

Help !
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017

This is commonly the issue with using AD and the public domain.
Often the suggestion would use a separate name.domainname.com

To remedy your issue for www nly, under no circumstance alter the A.record for domainname.com as the consequences will be severe.
David FavorFractional CTO
Distinguished Expert 2018

You can do this + this breaks DNS best practices. Better to do something like this in your mycompany DNS zone file...

$TTL 5m
$ORIGIN mycompany.com.

@               IN  A      xxx.xxx.xxx.xxx
www             IN  CNAME  @

Open in new window

Also, you'll have far less problems if you only use your public DNS zone servers, so no local DNS entries.

Having both public + local DNS entries, almost always ends badly.

Note: There's no real benefit to having local DNS entries, as TCP/UDP routing understands fastest routes/paths between machines + handles this for you.
Distinguished Expert 2017

While I agree with David in most cases, in this case I urge you not to follow the above suggestion.
In an AD environment, the A record of the domain should not be altered as it will cause havoc on the domain when \\addomain.com\ references.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial