So you want to create your own website, what is this DNS all about?
When you open your web browser and type in a website, for example: facebook.com
- Your web browser looks at the name, sees there is a .com at the end, and asks some servers called root name servers to find out whether facebook is listed on there.
- The root name server returns the name server details for facebook.com’s hosting provider.
- Once facebook’s name servers have been found, then the web browser asks facebook’s name servers for the IP address of facebook.com, and if found it connects to the IP address to get the content.
All this happens before you even see the webpage, and it is seamless.
Well, it’s seamless when it all works properly, however a few things may go wrong:
If a domain has expired, or was mistyped, you will get an error similar to this in your web browser. This is Firefox telling me the site doesn’t exist.
In this example, the server exists but the server is not set up for the account, or the account has been cancelled.
What is DNS and what does it look like?
Domain Name Service or DNS is a set of rules that are set on a name server that tells a web browser where to look for a website.
Additionally, email routing and some other services are managed through DNS as well.
If you have a domain name, you can change your DNS settings with who you registered the domain name with.
In the picture above, you can see how the DNS is set up for johnthecomputerman.co.uk
I use 123-reg.co.uk for my domain registration and OVH for my hosting.
You can see the first column is the DNS entry, the second is it’s type (A is address, TXT means text field, SPF is to do with email verification, MX tells the email program where to send email to, and CNAME is used to have an entry point to something else.)
A star entry matches any host name. This means I could use www, mail, imap etc and they will all point to the same IP address.
An @ entry matches the domain itself, so johnthecomputerman.co.uk
The last entry is a verification for Google’s G Suite to prove I own the domain so I can use their premium service for business.