[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 66
  • Last Modified:

www redirects to non www on any browser

Windows Server 2008 SP2
DC - DNS Server
DNS Manager has A record for www to point to an external IP
DNS Manager has A record for non www to point to internal IP
DOMAIN.COM is also the domain used for AD ( i know it shouldnt have been, we will look to change in the future)
WWW.domain.com is a external host, works when your outside the office.
IIS 7 is installed, already uninstalled and reinstalled
Host File is empty. Have tried adding external ip  www.domain.com but still didnt work.
Ping to www.domain.com shows the external IP. Nslookup www.domain.com shows the public IP.
3 Browsers, cleared history

When you type http://www.domain.com, the address bar redirects and shows http://domain.com and opens the IIS homepage. Cant figure out where on the server setting is making the http://www.domain.com redirect to http://domain.com.
0
rolando montalvo
Asked:
rolando montalvo
  • 2
1 Solution
 
footechCommented:
It would be on the webpage.  If your site is redirecting www.domain.com to domain.com, there's nothing you can do with DNS to change this.  Only a site redesign can fix this (I don't use it, but I believe I've heard that this is the way WordPress sites behave).
0
 
rolando montalvoAuthor Commented:
Wow. I didnt even realize it when I was testing it externally. Thank you.
0
 
DrDave242Commented:
Footech is right; it has to be changed on the site.

Specifically, there's an HTTP redirect present on that site. When a browser hits http://www.domain.com, the site returns a response with a status code beginning with a 3. Code 301 is probably the most common, as it represent a permanent redirection. The response also includes the target of the redirection - i.e., where the site resides now. In your case, that target is http://domain.com.

The browser then sends a new request to the redirection target. That's why you can see the URL change in the address bar, and that's why it doesn't work from inside a domain that's named domain.com, because that name will (by design) resolve to the IP addresses of the domain controllers.

Depending on the web host, it might be very easy to get them to remove the HTTP redirect, or it might be a big pain. Unfortunately, there's no other way to get it to work, aside from renaming the AD domain.
1
 
footechCommented:
@rolando - Thanks for closing the question.  Personally I would have split points with DrDave242 as I think he added enough extra useful info.
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now