Questions tagged [cname-record]

A CNAME record or Canonical Name record is a type of resource record in the Domain Name System (DNS) that specifies that the domain name is an alias of another, canonical domain name.

This is typically used when running multiple services (like an FTP server and a webserver; each running on different ports) from a single IP address. Each service can then have its own entry in DNS (like ftp.example.com and www.example.com).

727 questions
163
votes
3 answers

Why can't a CNAME record be used at the apex (aka root) of a domain?

This is a Canonical Question about CNAMEs at the apices (or roots) of zones It's relatively common knowledge that CNAME records at the apex of a domain are a taboo practice. Example: example.com. IN CNAME ithurts.example.net. In a best case…
Andrew B
  • 32,588
  • 12
  • 93
  • 131
103
votes
8 answers

Is a wildcard CNAME DNS record valid?

I know it's valid to have a DNS A record that's a wildcard (e.g. *.mysite.com). Is it possible/valid/advised to have a wildcard CNAME record?
Ben Mills
  • 1,163
  • 2
  • 8
  • 9
95
votes
2 answers

Should CNAME Be Used For Subdomains?

I manage multiple websites that currently have the following DNS configuration: example.com - A Record - Production Server IP test.example.com - A Record - Test Server IP www.example.com - CNAME - example.com beta.example.com - CNAME -…
Joseph Sturtevant
  • 1,274
  • 3
  • 15
  • 17
88
votes
3 answers

Is a CNAME to CNAME chain allowed?

Is it allowed in DNS to have a CNAME record that points to another CNAME record? The reason we need this is that we have a hostname that we want to be looked up to the IP address of our web server computer. We also have another web server computer…
Erik Sjölund
  • 2,115
  • 5
  • 22
  • 27
74
votes
6 answers

How to redirect domain A to domain B using A-Records and CNAME records only

I have 2 domains hosted with different hosts. I need to redirect Domain A to Domain B. Unfortunately I can't do a 301 redirect from Host A, but can only modify/add DNS entries (A-Records and CNAMEs) at Host A. Surely it is possible to redirect…
Prembo
  • 927
  • 1
  • 6
  • 11
62
votes
2 answers

Can we have multiple CNAMES for a single Name?

I need this for load balancing. For example, I've two azure storage accounts (say a and b) and the blob addresses for those are a.blob.core.windows.net and b.blob.core.windows.net. Both of them store identical data. Now I need to provide a single…
Raghuram Murthy P
  • 723
  • 1
  • 5
  • 4
55
votes
2 answers

CNAME record/alias in windows hosts file?

Is it possible to enter some sort of CNAME record or alias in the windows hosts file (C:\Windows\System32\drivers\etc\hosts)? Basically I want to forward all requests made to host A to host B, without having to hard code the IP address (which…
MEMark
  • 651
  • 1
  • 5
  • 8
52
votes
4 answers

Can a CNAME DNS record point to a subdirectory

Can a DNS record point to an address like my.domain.com/subdir1
Hannes de Jager
  • 744
  • 2
  • 6
  • 11
48
votes
3 answers

CNAME for top of domain?

Is it possible to set a CNAME record at the top of a domain? (i.e. @ CNAME www, @ CNAME foobar.com., etc.) My ISP says that it's only possible to use CNAME's for subdomains but I've read somewhere else that is should be possible even if not…
Martin
  • 775
  • 2
  • 7
  • 13
47
votes
3 answers

How to list all CNAME records for a given domain?

I cannot list them using dig/nslookup/host.
Paweł Gościcki
  • 1,120
  • 1
  • 15
  • 18
41
votes
4 answers

Using CNAME to point to another domain to save IP addresses

I have one server which I'm hosting a handful of sites on. Currently, each site has it's domain hosted by an independent provider and each has an A record pointing to the server's IP address. But if I want to change the server in the future, I will…
wows
  • 525
  • 1
  • 4
  • 7
33
votes
2 answers

www a-record vs cname-record

I have set up DNS for my website so that example.com is an A record (pointing to the IP), but I don't know what to do about www.example.com. I intend to add a CNAME record www.example.com so it would become an alias of example.com. BUT, I've been…
Sorin Buturugeanu
  • 341
  • 1
  • 3
  • 4
32
votes
2 answers

What does the TTL on a CNAME record mean?

Due to how many servers are involved in my network, I have a hard time keeping them all organized. Some of them don't have static IP's, so I thought it might be nice if I made a config.mydomain.com domain. On this domain, I could store A records and…
Ryan Pendleton
  • 446
  • 1
  • 4
  • 9
29
votes
3 answers

Do I need a separate SSL certificate for a DNS redirect?

I am implementing a multi-tenant application where my application hosts and serves technical documentation for a tenant's product. Now, the approach that I was considering was - I host the documentation at docs..mycompany.com and ask my…
27
votes
2 answers

Adding both CNAME and TXT DNS records for one subdomain

I have a Heroku app and I need to set up a domain for it. The common way to set it up is to use CNAME record to specify that this domain is an alias to .herokuapp.com. The thing is, I also want to add Google Webmasters and…
serge1peshcoff
  • 413
  • 1
  • 4
  • 8
1
2 3
48 49