02 Mar, 2021
Last edited: 04 Nov, 2024, 7:07 AM
DNS settings for setting up your network site on MainCross

Navigate the complexities of DNS settings with ease! This article simplifies terminology and guidance for domain registrars, nameservers, URLs, and redirection, ensuring a smooth setup process whether youre managing existing domains or launching new ones.

There's a lot of information on the Internet about how DNS settings work, where to configure, what to set, but sometimes these can be confusing and overwhelming. So here's a rehash of all things you already know, and some things you may not, in simple terms for our purposes. If you want to do the full monty on all things DNS, then a search engine is your best friend.

Some terminology#

Domain registrar - the place where you bought the domain name. Usual suspects are namecheap, porkbun, godaddy etc. The domain points to 1 or more nameservers.

Nameservers (NS) - The nameservers contain all the DNS settings. That's all. Its the simplest thing and has been made needlessly complicated by over describing what it is. NS settings are essential and there is no way to proceed without having these set.

Domain Name System (DNS) - These are a bunch of optional settings which translate the verbose names of services you desire to their internet names and addresses. Eg when you type ashinydomain.com, the DNS settings may translate this to your hosting server address. Similarly when you want your custom email, eg [email protected], the DNS settings inform where the emails should be sent to etc.

Subdomains - Anything in front of the ashinydomain.com is the subdomain. This may site1.ashinydomain.com, site2.ashinydomain.com. And now you may realize that www.ashinydomain.com is also just a subdomain, nothing special going on here.

Wheeeeee.

Website URL - Obviously everyone knows what that is, but we need to delve a bit deeper. A URL consists of multiple parts as shown in this diagram:

So your domain ashinydomain.com can have 4 URL variations:

  1. http://ashinydomain.com - this is also called a root domain, naked domain, or bare domain
  2. https://ashinydomain.com
  3. http://www.ashinydomain.com
  4. https://www.ashinydomain.com

Its important to realize that these are four different addresses as far as the Internet is concerned, and one may set up 4 different sites at these 4 addresses. Of course, that would be endlessly confusing.

Redirect - A redirection service sends one site to another. There are 3 common uses:

  1. Your primary site is ashinydomain.com, but you think its going be very valuable and don't want squatters. So you've also bought ashinydomain.co, ashinydomain.net etc. You can redirect these to the primary domain so that anyone visiting ashinydomain.net automatically ends up on ashinydomain.com.
  2. You have been using ashinydomain.com, but like all of us who need to do something all the time, you bought ashinierdomain.com. Hurray for you, and jingle jingle for the registrar who made money off you. Now you can redirect your older site to the new site.
  3. This is what redirect is mostly used for - redirecting the 4 versions of the same URL to a single URL. One would almost always redirect all variants to this https://www.ashinydomain.com.

Setup for MainCross#

  1. Existing domain - replace existing site
  2. Existing domain - setup on a subdomain
  3. New domain

I have an existing domain and I want to replace my existing site#

Remove any A and CNAME records for the naked domain (ashinydomain.com) and www subdomain (www.ashinydomain.com), and then follow the steps similar to setting up a new domain, taking care not to delete other existing settings like MX, TXT etc records.

I have an existing domain and I want to setup on a subdomain#

  1. Decide on the subdomain name, eg community.ashinydomain.com or app.ashinydomain.com. This can be anything that you desire.
  2. Setup a CNAME record for your subdomain <subdomain>.ashinydomain.com pointing to an address we will provide when you purchase a plan from us. This is the only setting you need to do. Its dead simple.
  3. If you are using Cloudflare for DNS management, do NOT turn on the CF proxy (denoted by the orange cloud) for this record.

I just bought a new domain, what next?#

If you've just bought a shiny new domain, first of all, Congrats! Next, on to the business of setting it up and making it work for you.

Lets say the domain name is ashinydomain.com. You would have bought this from some registrar and they usually have their own NS servers, and DNS service, and they would filled it up with a ton of meaningless junk, which confuses the hell out of people.

A bunch of garbage settings, by default

People see all these settings as soon as they start and they think, wow some arcane stuff is going on here, I don't understand anything, but it must be important so I'll just leave all this in here.

In no uncertain terms, let us tell you - delete ALL these settings, they will lead to endless headache later. If you really really want to play safe, take a screenshot, save it somewhere, but for heaven's sake just remove all this. Ignore all the protests made by the registrar. They will ask you things like: Are you sure? The sky will fall. Tick here to agree that you know what you are doing, blah blah.
WARNING - DO NOT DELETE IF THIS IS YOUR EXISTING SITE. This part of the help that you are reading is only for newly purchased domains.

So now that you have a clean slate, its time to move the NS server away from the registrar.

NS settings

We highly recommend CloudFlare for managing all things DNS, but you could chose another service that you prefer, like Route 53 from AWS if you want to make Bezos baby even richer.

Step 1 - Sign up on CloudFlare (CF) and add your domain there, they will give you 2 NS addresses to add at your registrar. These usually look like:

If you haven't deleted all the garbage DNS settings at your registrar, CF will bring them all in needlessly. Delete ALL of them now. See this is what you get when you don't listen to us.

Step 2 - Go back to your registrar and change the current nameservers from whatever they are to these new ones. Again ignore any protestations made by the registrar.

Step 3 - Inform CF that the NS is set, and then CF will put your domain into a verification queue and inform you within 24 hours or so once verification is complete.

DNS settings

Once CF has enabled your new domain, log into the CF dashboard. As mentioned earlier, remove all the garbage DNS settings and now you need to add 2 entries similar to this:

Setup a CNAME record for your www subdomain www.ashinydomain.com pointing to an address we will provide when you purchase a plan from us. Do NOT turn on the CF proxy (denoted by the orange cloud) for this record.

This will get your site working on http://www.ashinydomain.com. But we still need to get the naked domain working ie http://ashinydomain.com, and of course the https versions of these. Remember what we said above about the 4 variants.

Setup another CNAME record for the naked domain ashinydomain.com pointing to the same address. TURN ON the CF proxy for this address. This is a dummy record in order to get the redirection to work.

Redirection

Now all we need to do is the redirection step as we mentioned so that your network site resolves at all 4 URLs. in the CF dashboard, under Page Rules, click on Create Page Rule and setup similar to this:

This has setup a rule to forward your domain ashinydomain.com/* to https://www.ashinydomain.com/$1

That's it as far as the settings for MainCross go!

Rinse repeat for any others sites that you purchase.

Propagation delay

Due to the distributed nature of the Internet and caching of various values at multi-tiered servers worldwide, it may take a bit of time for DNS settings to propagate. Internet infrastructure is getting faster all the time, and what used to take upto 48 hours earlier, usually takes an hour now. Nevertheless, please be warned that there is a delay between setting a new DNS record and it being visible to other servers and services. Hence don't fret when you've just setup something new and it isn't working.

A great way to debug your DNS settings (and learn about what's going on) is to use a tool like DNS Lookup Tool | UltraTools

Future DNS settings

Now that you've gotten a taste of the power of DNS, this is just the start of your journey. You will probably need more services:

  1. Google Analytics
  2. Google Search Console
  3. Custom Email

and so on and so forth. Each of these services will need 1 or more additions (called records) to your DNS settings, eg CNAME, MX, TXT etc. Just keep adding them to CF on the dashboard. These are outside the scope of MainCross services; please refer to their help pages for setup.

WARNING - If you are using the MainCross service, do NOT delete the settings we've asked you to set up earlier, do NOT add any A record for your domain & www subdomain, do NOT add another CNAME for your domain & www subdomain. Your MainCross network site may immediately stop working.
Article is helpful?
Save, embed, share, report