Roland
Roland

Reputation: 33

does the complete url stay on a CNAME alias

domain.com       A       IP
www.domain.com       CNAME   domain.com

In this scenario would www.domain.com/foo/bar point to domain.com/foo/bar?

Would the url still be www.domain.com/foo/bar

Thanks

Upvotes: 0

Views: 181

Answers (2)

Bruno
Bruno

Reputation: 122739

In this scenario, requests to http://www.domain.com/ and http://domain.com/ would connect to the same IP address but would use two distinct host names: www.domain.com and domain.com respectively.

There wouldn't be a redirection from http://domain.com/ to http://www.domain.com/ (or the other way around) unless the server was configured to do so (but this isn't directly linked to the DNS configuration, rather it's about the configuration of the HTTP server).

Upvotes: 1

Bjorn Bailleul
Bjorn Bailleul

Reputation: 3265

The URL will stay the same. On DNS level your URL will be mapped to the same IP address as it is known for domain.com

So you will receive a request from www.domain.com

If you change the underlying IP address of domain.com it will automatically reflect to the CNAME alias www.domain.com

Upvotes: 0

Related Questions