0
votes

I have a SSL certificate for domain example.com. I want to redirect www.domain.com (and also the 2nd domain, e.g domain.com.au) request to the domain.com. In the example.com domain DNS setting I see

CNAME www.example.com is an alias of example.com

do I have to play with that entry or maybe set up that redirection on my server (Windows Server 2008 R2) ?

2

2 Answers

2
votes

The CNAME only tells the browser (or more accurately, the resolver) how to find the IP address of the domain name. In this case, when the browser tries to resolve "www.example.com", it finds a CNAME record, so it needs to follow that alias and resolve "example.com". Eventually, it should arrive at an IP address to which it can make a HTTP(S) connection.

In short, yes, you need to setup the redirection on your web server as well.

0
votes

Use URL Rewrite for redirections. It's a bit cryptic at first but it's a powerfull tool in IIS for this purpose. http://www.iis.net/learn/extensions/url-rewrite-module