Hot answers tagged

68

The whole idea behind the MX record is to specify a host or hosts which can accept mail for a domain. As specified in RFC 1035, the MX record contains a domain name. It must therefore point to a host which itself can be resolved in the DNS. An IP address could not be used as it would be interpreted as an unqualified domain name, which cannot be resolved. ...


45

Never you mind the comments section below, and never you mind the previous answers in the edit history. After about an hour of some conversation with friends (thank you @joeQwerty, @Iain, and @JourneymanGeek), and some jovial hacking around we got to the bottom of both your question and the situation on the whole. Sorry for brusqueness and misunderstanding ...


25

In addition to Wesley's excellent answer, I'd like to add that there is already a solution to prevent this. It's called DNSSEC. The basics are this: You register your domain (I'll go with the eminent name wesleyisaderp.com here, just because.) You register your name servers with your registrar, usually via a web interface that you authenticate to with a ...


17

so you are not looking at redirection as such (as that happens at the app level ie on apache/nginx/wherever) but rather on the DNS resolution - host on which DomainA is hosted will or should never be hit - based on your description as you want the DNS requests to be resolved to the IPs of the DomainB. Unless I'm missing something in your request ? As Shane ...


15

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.


15

DNS as a protocol has some different types of values, these are not interchangable. It's important to note that DNS is a binary protocol with strict mappings between the type of record and the type of data that such a record holds. For example: An A record holds an IPv4 address (4 bytes of data, fixed length). An AAAArecord holds an IPv6 address (16 bytes ...


13

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

An A record is a DNS record. Specifically it's the DNS record that maps from a hostname to an IP address. Every URL that contains a domain name must go via an A record to find the IP address of the server that's hosting it. See RFC 1034 and RFC 1035.


10

The record gets delegated from the parent nameservers - it's like a chain (or usually described as an inverse tree.) Every DNS client knows the IP addresses of the root servers - these are a set of servers (I think it's 13) that provide the IP addresses of the registries' servers - Nominet for .uk, eurID for .eu etc. Your domain is then registered with the ...


10

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 ...


10

There is an article here on setting up NXDOMAIN redirects: BIND 9.9 redirect zones (for NXDOMAIN redirection). Here is the example as given by ISC, but full explanation is available on their page. In named.conf, you add a new "zone": zone "." { type redirect; file "db.redirect" ; }; And then in that zone file db.redirect, you populate it with ...


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.


8

No, this doesn't work. You can't legally have a CNAME at the root of your zone, because the SOA record belongs there too and it's not possible to have both a CNAME and other RRs attached to the same domain name. Your zone file would need to look like this: $ORIGIN example.com. @ IN SOA ...... IN A <server_ip> * IN A <server_ip&...


8

The difference between having a A record vs CNAME for www would be an extra look up. In case of the CNAME the after figuring out that www is a CNAME to example.com, another look will be done for example.com. Other than that if you are planning to use a CDN or a 3 party acceleration service then a CNAME would come into play. Example a lookup of www.google....


8

The simple answer is that you need to manage their DNS. Get a hosting account from a DNS provider or gulp make your own DNS service. The simpler answer is to tell your clients to own up to the responsibilities of having an IT infrastructure and just change their darned DNS records. The harder / crazier answer is to have your clients CNAME their A record to ...


8

Just a couple of notes: Anycast doesn't really provide A record failover. You mention "external DNS failover" and roundrobin - these are not the same things at all. Roundrobin is having multiple A records for the same hostname. DNS failover is changing a single A record to a different IP address when a link goes down and, ideally, changing it back when the ...


8

You can't use a CNAME record at the zone apex. This is because a CNAME record defines one name to be an alias of another regardless the requested record type. This, in turn, also means that a CNAME record cannot coexist with other records as that would be a conflict/inconsistency. The zone apex always has at least SOA and NS records, which means there can ...


7

There are two distinct options: They can continue hosting DNS for the domain and point the A record to you. This is simplest and they may wish to retain this control. But it introduces some administrative overhead because you will need to contact them if you ever need to change your IP address. They can delegate the entire domain to you. They will need to ...


7

Why do you think you can only have one A record per IP? You can have as many as you like. The first example is correct and fine. What you can't have is mutliple IP's for the reverse lookup. I think you may of confused the two.


7

Your domain hasn't actually got an MX record. $ host -t mx samholguin.co.uk samholguin.co.uk has no MX record Without an MX record, mailers will fall back to trying to deliver to an address for the naked domain. That address is: $ host samholguin.co.uk samholguin.co.uk has address 209.222.30.215 An MX record for a subdomain would only apply if you were ...


6

Using Google's public DNS servers, the expiration of the A record causes a query of the CNAME record as well, even if the CNAME has a longer TTL. We painfully experienced that because the DNS provider charged us for DNS queries. The CNAME hosted by the DNS provider had a TTL of several days. The TTL of the A record was hosted on Windows Azure with a TTL of ...


6

If you have an A record for example.foo.com then no DNS record for any other domain will affect that. So the answer is no. Other facts to bear in mind: You can't have a CNAME and an A record for the same fully qualified domain A CNAME is not he same as a 301 redirect. A CNAME will return the same ip address as the new domain. Your browser will go to that ...


6

Generally the best practice, for ease of maintenance, would be something like this: [A] mydomain.com 123.45.67.89 [CNAME] www.mydomain.com mydomain.com [CNAME] blog.mydomain.com mydomain.com [CNAME] www.blog.mydomain.com mydomain.com [A] mail.mydomain.com 123.45.67.89 [MX] mydomain.com mail.mydomain.com ...


6

I'm afraid you cannot do what you are asking directly unless you want HTTPS traffic to go to e.g. secure.example.com instead of www.example.com. The only solution would be to put a proxy/firewall/load balancer device in front of your webservers that forwarded on traffic to the different IP addresses based on the protocol used.


6

There's no way to perform this with DNS, as you have to have one IP address for a given NAME, irrespective of the protocol the options available to you are: Use a firewall/router to route the traffic accordingly to different servers. Add a new record for, for example, secure.example.com as 2.2.2.2, configure the server hosting 1.1.1.1 to redirect any HTTPS ...


6

I think you're badly misunderstanding how DNS work. NS records are used to find the authoritative server for a domain. The A resource record is what the client is requesting (normally) and is what will be looked up for the response to the client. Quickly-ish: Lets say you own example.com. Someone enters http://www.example.com into their webbrowser. Their ...


6

If your mail server is staying where it is then I would do the following: Create a new A record for mail.domainname.com (or whatever you like really), pointing at the existing IP and change the MX record to use this at the same time. Wait a good day or so to make sure any cached copies of the old MX record disappear. (Technically, you only need to wait for ...


6

I'll throw this out as a guess. Course, I'm home with the flu so maybe I'm loopy. RFC 974 states: The first step for the mailer at LOCAL is to issue a query for MX RRs for REMOTE. It is strongly urged that this step be taken every time a mailer attempts to send the message. The hope is that changes in the domain database will rapidly ...


6

You will likely run into the same problem with CNAME records. Your best long-term solution is to continue using NetSol as a registrar, but move your DNS services elsewhere, to somewhere without arbitrary limits like your current provider has. I'm a big proponent of AWS Route 53. It's easy to use, very reliable, cheap, easy to automate things via their API, ...


5

Have an A record for the server's primary (or "infrastructure") hostname. The websites hosted on it should then use CNAME records pointing at that hostname. The exception is if you want "bare" domain names (i.e. without a www. or similar prefix) to work. DNS rules mean you can't usually use a CNAME for those, which unfortunately means that those records ...



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