89

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


59

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


51

The most likely explanation is a user unfamiliar with DNS tried to configure the DNS records and made a mistake that's glaringly obvious to anyone familiar with DNS, but not to people who aren't. While a DNS label can be any arbitary binary data generally, you should read the rest of section 11, in particular: Note however, that the various applications ...


37

So you are not looking at redirection as such (as that happens at the app level, i.e. on Apache/Nginx/wherever) but rather on the DNS resolution. The 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 DomainB. Unless I'm missing something in your request? As Shane ...


32

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


18

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


12

As mentioned in the comments, you will need to use A records instead of CNAME records. CNAME records will not be able to point at an IP Address. The key to making each of the sites to work is to specify ServerName correctly for each virtual server in your Apache config.


11

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.


11

Use A record to point to the sub domains myurl.com. A 300 123.123.123.123 api.myurl.com. A 300 123.123.123.123 app.myurl.com. A 300 123.123.123.123 preview.myurl.com. A 300 123.123.123.123 www.myurl.com. CNAME 300 myurl.com.


10

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


10

Yes you can. It is called round-robin DNS, and the browser just chooses one of them randomly. It is a well used method of getting cheap load balancing, but if one host goes down, users will still try to access it.


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

As others have stated, it's not possible to perform HTTP redirection with DNS alone. DNS and HTTP work together to redirect a user from one web page to another. You can use DNS by itself to make domain A show the same content as domain B, but the web browser will show domain A in the URL. You need to be very careful with this as it's quite bad from an SEO ...


8

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


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

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


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


8

The Pingdom DNS check tool does not clearly state this but from its behavior it's clear that it expects the name of a zone, not just any domain name. Ie, whatever you enter it expects that it should be a zone of its own (with delegation in place), which will not be the case in your example.


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

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

Try: @ A 178.79.185.207 Your * covers every subdomain of the root, but not the root itself. What's your DNS server, by the way? If it was bind, you'd need an IN in there..


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

Assuming that the apex A record for example.com. was pointing at a broken IP address, most companies I know would change the A record and skip the www change entirely: Most admins would rather not have their website broken for users who key in the name of the website without the www prefix. This goes double for admins who don't trust their webapp devs to ...


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


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


6

You'll be fine so long as you claim ownership of the domain at DigitalOcean (i.e. associate it with your account) before you tell the registrar to use their name servers. If someone has associated your domain with their account already you'll find out before the DigitalOcean nameservers become authoritative. And if that happens, talk to DigitalOcean ...


6

As mentioned you have nameservers with two different providers: $ whois uszyjmimamo.pl DOMAIN NAME: uszyjmimamo.pl registrant type: individual nameservers: ns1.he.net. ns3022609.ip-51-254-199.eu. Is that intentional? That alone isn't a problem, but it makes things more difficult to manage, as your records ...


5

The A record should only be delivered to if no mx records exist. If they exist but the server doesn't answer or 4xx the mail, the sending server should queue the message and try again. If the MX fails to answer and the sending server then tries the A record it sounds to me like that server is broken. Edit-.. Troubleshooting steps-- As it only happens on ...


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