Table of Contents
Local Domain Name Same As Website
Best practices for Active Directory (AD) domain design advise against using a registered domain name as the name of an AD domain. Viable alternatives include using a non-public DNS suffix (.local or .lan, for example) in the AD domain name.
In this case, the company’s website, can’t be reached from inside the office by machines joined to the AD domain, but machines outside the office have no issues reaching the website.
The issue arises because a local DNS server that has a particular lookup zone in its database and point to domain controllers that have not any website.
Solution 1: Using local DNS Server
The solution to this issue is simple: create a host record named www in the domain.com zone on the Domain Controller and give that record the website’s public IP address. Machines that query that DNS server then receives the correct response and be able to browse the website.
Internal users would be access the company website with www.domain.com.
Using this solution, user must add www prefix to access the company website, it’s inconvenience. Let move forward to the next solution to dealing with this issue.
Solution 2: Using Nginx to serve as a web server
1. Download then extract downloaded file Nginx for Windows http://nginx.org/en/download.html
2. In the extracted folder, navigate to conf folder.
3. Open nginx.conf using any text editor.
4. In the server block, add this line to redirect from domain.com to www.domain.com.
rewrite ^(.*) http://www.domain.com$1 permanent;
5. Save the configuration file then open nginx.exe to run Nginx application. When your server restarts, you must run Nginx app manually, let try this How to Install Nginx in Windows as a Windows Service Auto Start.
Now, internal users can access the company website without www prefix. Just simple type domain.com in the address bar.
Not a reader? Watch this related video tutorial: