DNS settings

Hi,

I want to move a couple of websites from a shared hosting account to a Linode server and have some questions about the DNS stuff.

Here's the situation:

I cannot change the registrars nameserver settings but I can change the DNS settings on my shared hosting.

To avoid the need of installing and maintaining a mailserver on the Linode I would like to keep the shared hosting where I can easily create mail forwarders and mailboxes if needed (using cPanel).

I'm a bit confused about the DNS configuration to be done both on my shared hosting and on the Linode

I already changed on my shared hosting the IP of the www A-record to the IP of the Linode, but this way the site is not reachable without the www prefix.

Changing the IP of th FQDN a-racord messes up the mail-settings.

Thanks for your advice!

12 Replies

What's the domain? To troubleshoot it'd be great to have that info.

I'm testing this with calf.be domain

Both calf.be and www.calf.be resolve to 212.71.252.248 for me, which is a Linode IP, so DNS wise it should all be good. You'll want to look into your webserver configuration - e.g. nginx or Apache, the vhost may be misconfigured.

I can't seem to reach either www.calf.be nor calf.be because port 80 appears to be closed. Perhaps a firewall blocking it?

For some reason the apache was not started succesfully. Now indeed bot calf.be and www.calf.be resolve to my Linode.

Using the shared hosting mailserver however is not working.

I also setup serdaryoga.be to test with.

I wonder what's the best strategy. Using Linode DNS and redirect mail to shared hosting or use DNS on my shared hosting and redirect to Linode?

What I've configured for serdaryoga.be:

on shared host:

NS-records to use shared hosts nameserver

serdaryoga.be. A-record pointing to Linode IP

www.serdaryoga.be. CNAME-record pointing to serdaryoga.be.

mail.serdaryoga.be. A-record pointing to shared hosting IP

mail.serdaryoga.be MX-record pointing to mail.serdaryoga.be

I've setup a mailadres that forwards to another, external mailbox.

on linode:

no DNS config done.

The site is shown with and without the www prefix but mail does not seem to be working.

Am I still missing something?

You most likely want to create an MX record for serdaryoga.be instead of mail.serdaryoga.be. The target of the record should still be mail.serdaryoga.be. In other words, you want to say that mail destined for addresses like user@serdaryoga.be (not user@mail.serdaryoga.be) is to be handled by mail.serdaryoga.be.

Thanks dcraig.

This seems to work indeed!

Now trying the other way around with calf.be domain.

on linode:

MX-record pointing to mail.calf.be

mail.calf.be A-record pointing to shared host IP

www.calf.be & empty (calf.be?) A-record going to Linode IP

on shared hosting:

NS-reords to use Linode nameservers

calf.be. A-record going to Linode IP

MX-record pointing to mail.calf.be

mail.calf.be A-record pointing to shared host IP

Again, this is working for the site but not for the mail :-(

What a mess!

If you wish to use the Linode nameservers for calf.be, you need to make this change at your registrar (perhaps www.alfahosting.be). When you register a domain, the registrar typically provides you with a set of nameservers you can use (like ns3.thefasthosting.com and ns4.thefasthosting.com), or you can opt to use your own nameservers, like the ones Linode provides (ns1.linode.com through ns5.linode.com). You currently have things configured to use your registrar's nameservers (ns3.thefasthosting.com and ns4.thefasthosting.com) instead of Linode's nameservers. If you wish to use Linode's nameservers, you need to specify them as the authoritative nameservers for your domain, which is in some separate part of your registrar's web interface than the one you're currently using.

Instead, what you have done is to create NS records on the registar's nameservers that indicate the nameservers for calf.be are actually the Linode nameservers, while leaving the registar's nameservers listed as the authoritative nameservers for the domain. So when someone wants to look up one of your DNS records, they are told that ns3.thefasthosting.com and ns4.thefasthosting.com are authoritative for the domain, but when they ask ns3.thefasthosting.com or ns4.thefasthosting.com for the DNS record, ns3.thefasthosting.com or ns4.thefasthosting.com tell them that the Linode nameservers are actually the ones they should be asking. Ideally, when someone wants to look up a DNS record, they should be sent to the Linode nameservers directly, bypassing the registrar's nameservers completely.

Essentially, when Craig asks about calf.be, he is told that Adam knows about calf.be. But when Craig asks Adam, Adam says that he should go ask Linda instead. But should Craig believe anything Linda says? According to the registrar, Adam is the person who knows all about calf.be, after all. What we want to have happen is that when Craig asks about calf.be, he is immediately told that Linda knows about calf.be (and Adam is never mentioned!).

So anyway, figure out in your registrar's web interface where you set the authoritative nameservers for your domain, and change them to the Linode nameservers. Do not create NS records in the same area of the web interface that you add A and MX records.

You do not need to maintain A and MX records on both your registrar's nameservers and on Linode's nameservers. In fact, once you change the authoritative nameservers for calf.be to the Linode nameservers, you might no longer have access to the section of the registrar's interface that allows you to set A and MX records (since you're supposed to do that at Linode now).

Ok, hope it's a bit less messy now ;-)

I changed the nameservers to ns1.linode.com, … etc on my shared hosting in cPanel "Edit DNS Zone" (I think that's the correct place to do this???)

There is only 1 A-record left, pointing to the Linode IP.

On Linode, I set an A-record mail.calf.be pointing to the shared hosting IP and a MX-record going to mail.calf.be

Unfortunately it's still not working for mail.

On the other hand, I think serdaryoga.be is now configured well, using my shared host nameservers so maybe I should just take that way of working. Unless this has some disadvantages?

The registrar still says the nameservers for calf.be are ns3.thefasthosting.com and ns4.thefasthosting.com, not the Linode nameservers.

I can't imagine a registrar would be using cPanel to allow you to control which nameservers are authoritative for your domain, but I am admittedly unfamiliar with cPanel and its myriad capabilities. My thinking is that if you're in cPanel or in something named "Edit DNS Zone", you're in the wrong place to be setting the authoritative nameservers at your registrar.

If you can't figure out how to set the Linode nameservers as the authoritative nameservers for your domain, you should just configure calf.be in the same way as serdaryoga.be.

The registrar just confirmed that I cannot change the nameservers myself.

The fastest way to migrate my sites to Linode will be to keep the shared hosting DNS and just change the A-records to point to the Linode.

Thanks for your support dcraig!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct