Building my website Pt. 1
In this 3 part series I'm going to show you how I built the first version of my website. We are going to cover a few topics here, mainly centered around 3 topics: Domain registration/DNS, Code, and Deployment.
Domain Registration / DNS
I use Namecheap for my domain registration. I find it to be the easiest site to deal with, and they generally try to stay out of your way with upsold products. My domain is pretty simple, but I do use Fastmail for my personal email server, so there is some extra setup that needed to be done to route SMTP and DKIM. The other setup is setting A records to point to my AWS instance that we will talk about in the deployment section.
What is DNS?
DNS (Domain Name System) is a network database that stores internet information in a specific format.
DNS is what your browser uses to convert www.dpenning.com to my AWS deployment.
It can also store key/value records that allow other web services to validate data or transmit it securely.
I am only using A records and CNAME records right now.
What is an "A" Record?
A records return an IPv4 address for a given hostname.
In my case I want to point dpenning.com and www.dpenning.com to the same IP address.
| Type | Host | Value |
|---|---|---|
| A Record | @ | AWS IP ADDRESS |
| A Record | www | AWS IP ADDRESS |
You will see the special symbol @ which matches the naked hostname (dpenning.com).
Another way to implement this functionality is to provide a CNAME record which points one hostname to another domain.
| Type | Host | Value |
|---|---|---|
| A Record | @ | AWS IP ADDRESS |
| CNAME Record | www.dpenning.com | dpenning.com |
How do you get email to work?
I use Fastmail to view email routed to my domain. To set that up, I had to add several records. First, I set up MX records that point to Fastmail SMTP servers.
| Type | Host | Value |
|---|---|---|
| MX Record | @ | FASTMAIL SMTP SERVER 1 |
| MX Record | @ | FASTMAIL SMTP SERVER 2 |
Fastmail has one more step to get email sending correctly: adding DKIM information to your domain. DKIM is an encryption protocol that uses public key cryptography to ensure message contents are not altered. I added CNAME records that point to several Fastmail DKIM servers.
| Type | Host | Value |
|---|---|---|
| CNAME Record | fm1._domainkey | FASTMAIL DKIM SERVER 1 |
| CNAME Record | fm2._domainkey | FASTMAIL DKIM SERVER 2 |
| CNAME Record | fm3._domainkey | FASTMAIL DKIM SERVER 3 |
This is what I had to do in order to set up my DNS. Your results may vary depending on your registrar, DNS provider, and email provider.
Conclusion
Setting up your domain is pretty easy with some knowledge about how records work and how to set them up with your registrar and DNS provider. In the next post in this series, I'll go over how my website is structured and why I made some of the decisions I did.
Corrections? Questions? Want to talk about anything in this post? send me an email at...
blog@dpenning.com