Tag Info

Hot answers tagged

36

Yes, that's an appropriate use of CNAMEs. In the discussions I've been part of, the arguments tend to go like this: Against CNAMEs: There is a (tiny) performance penalty, as the downstream DNS caches need to perform 2 DNS lookups, one for the CNAME and one for the A-Record the CNAME points to. Vague, bogus arguments about CNAMEs having less "authority" or ...


28

It is possible to do this. At one point it was up in the air a bit until 4592 clarified that it should be supported. Just because it is possible doesn't mean it is supported by all DNS providers. For example, GoDaddy won't let you set up a wildcard in a CNAME record. In terms of whether it is advisable or not to do this, it depends on your usage. Usually ...


22

DNS records only map IP addresses to hostnames so in a word, no You could, however, use a hostname configuration in your web server to serve a subdirectory when a request comes in. Like having something.domain.com redirect/equate to somethingelse.domain.com/downhere. That would depend on your web server software, not DNS.


21

From RFC 1034 - Domain names - concepts and facilities: Of course, by the robustness principle, domain software should not fail when presented with CNAME chains or loops; CNAME chains should be followed and CNAME loops signalled as an error. So yes, it is allowed and properly written software will handle it just OK. CNAME chains aren't however ...


19

Not possible - this would conflict with the SOA- and NS-records at the domain root. From RFC1912 section 2.4: "A CNAME record is not allowed to coexist with any other data."


17

Correct, it is a breach of RFC 1034, section 3.6.2, paragraph 3: ... If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different. ... This applies here because the root of your zone must also have SOA and NS records.


15

There are two ways, both require administrator access or trust to the DNS records: Perform a zone transfer (AXFR) on the domain to retrieve all records for the domain. The DNS administrator needs to explicitly allow AXFR transfers to your IP address from your chosen DNS server. You can perform such a transfer like this: dig @ns1.google.com google.com AXFR ...


15

According to RFC 1123, the MX record cannot point to a CNAME. If I were in your situation, I would setup mail.ourdomain.com as an A record pointing to the new suppliers IP address and then quickly work on changing all MX records over to the correct data. Then address why changing MX records is so difficult in your organization. That being said, most mail ...


15

No you don't because DNS records don't propagate. What you do need to allow for is for any cached records to expire, based on the TTL of the record in question. If this is a new record, no caching can have occurred so the new record should be available and should resolve immediately. Additionally, the root servers (first level; .) don't host DNS zones or ...


13

The windows hosts file supports only ip->name mappings, it does not support any other standard DNS record types. See here: http://technet.microsoft.com/en-us/library/bb727005.aspx#EDAA I would recommend running a simple dns server in order to do the redirect you are talking about. Try powerdns http://www.powerdns.com/


12

Amazon is aware of the problem with root domains and the Elastic Load Balancer. They recommend this workaround: Configure the root domain to a service that redirects mydomain.com to www.mydomain.com (or any other subdomain of your choice) Set up a CNAME record that maps the load balancer DNS name to "www.mydomain.com". I don't like this solution, but is ...


11

If you're getting a 404, your CNAME is working just fine. If the CNAME wasn't working, you'd get an error indicating that no server could be found. You need to set up your web server to serve the content to both domains. In Apache, you'd use a ServerAlias directive to tell it that cdn-subdomain.domain.com is an alias of subdomain.domain.com.


11

I've set up a domain with godaddy using heroku so see if this helps. First you set up 3 A records with the hostname @ to point to the heroku ips: 75.101.163.44, 75.101.145.87, and 174.129.212.2 (check their docs to make sure they are the same when you do this). Then you add just one CNAME record if you want www and have it point to @. If you use the total ...


11

Simplified version: A records point to IP addresses. CNAME's point to other A records. You could use an A record, but for this you should have a highly available IP address for your EC2 instance. Amazon calls this product "Elastic IP Addresses". If you set up a CNAME to an A record that Amazon manages, then Amazon has control over a layer of indirection. ...


11

In BIND, the wildcard matches when another record does not exist. See http://en.wikipedia.org/wiki/Wildcard_DNS_record.


11

The CNAME should cache for an hour (the alias value), but when the corresponding A is looked up, it will only cache for a total of 1 minute. You're talking about two independent records that are handled separately.


11

a CNAME must point to an hostname not an IP address: http://en.wikipedia.org/wiki/CNAME_record This is still confusing because it doesn't answer the title of the post. It just points out that a CNAME must point to a hostname. Further, a record with the specific name requested will always override a wildcard or default record.


11

Firstly, the underlying reason is not that you must use an A record, but that you cannot use a CNAME record because those cannot coexist with other normal resource record types. The reason for that restriction is in §3.6.2 of RFC 1034: If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical ...


11

AFAIK there is nothing special to it. In your public DNS just create "your-name.your-domain.com" as a CNAME to "your-bucket-name.s3.amazonaws.com" and have the folder name match your domain name. CNAME record for my Amazon S3 domain, so have nicer URLs I assume you have your website hosted elsewhere. Inside the HTML there are links to images, videos ...


11

The actual RFC that defines the NS RR (RFC1035) just says that it's a domain-name without specifying the RR type of the target (though it does make it clear that it can't be an IP). It does get specific mention in RFC1912 though, section 2.4: Having NS records pointing to a CNAME is bad and may conflict badly with current BIND servers. In fact, ...


10

Unfortunately, what you're running into is a limitation of the DNS specification. Having an MX record for the same hostname as is defined as a CNAME record will fail in most DNS server implementations. Some older DNS servers will allow this, but they have been mostly phased out in favor of newer, more secure implementations. Instead of using CNAME ...


10

I added the line *.www IN CNAME my_webserver to my zone file in my bind config and that worked perfectly (ie. whatever.www.domain.com and whatever2.www.domain.com all pointed to my_webserver. It was also possible to to add exceptions to this by adding the line exception.www IN CNAME another_server so that ...


10

RFC 1034 described the CNAME record, originally. There may be some RFCs that obselete it, but I'm not sure off the top of my head.


10

Ports are not part the "normal" DNS system. There's no way to add a port to a A or CNAME record. Side Note: Some software supports SRV records which do include a port number. This is very uncommon and I don't know of any web browsers which support this (which is probably what you're asking about). If the websites are one the same machine, you can use host ...


10

This is generally a good idea, as you point out you only have to change the IP in one place now. The client would look-up test1, get pointed to default, then get the IP. It would then connect to Apache and tell Apache that it wants the test1 site (it does not tell the server how it found the server, just what the original request is).


9

The answer to your question will depend on the URLs you want your users to use. If you want users to access your application via http://app.domain.com/ or http://www.domain.com/ you can either use an A record to point app or www to the IP address of the application server, or add a CNAME record to point to the real name of the app server. ...


9

ok, the answer is hidden in your question: ...small DNS server...at most 5 domain names... ...queries will be speed up by using A Name records... Usually DNS lookups are done rarely, and are cached in the app anyway or on the requesting system. So, this 'speed up' argument is just hypothetical. I run reasonably large DNS infrastructure that ...


9

You can't use a CNAME as a root for your domain. To quote Wikipedia's article on RFC 1034 : An alias defined in a CNAME record must have no other resource records of other types (MX, A, etc.) The reason for this is because the CNAME tells clients that (in essence) you need to look here for your answer, but this applies for the entire domain. So not ...


9

The more specific DNS record overrides the wildcard. So your CNAME should override your wildcard A. What this might be is that you still have the domain name cached to the a record. Use the dig command: dig @yourdnsserver mydomain.freshdesk.com Normally it should return the CNAME.


9

As near as I can tell, the clarifications provided by RFC2181 are essential to demonstrating that a CNAME record at the apex is illegal. While there are plenty of RFC1034 passages that could be cited to explain why they would be volatile in behavior and therefore a bad idea, nothing short of forbidding a practice will stop a determined software engineer. (or ...



Only top voted, non community-wiki answers of a minimum length are eligible