Skip to main content

Preparation

Configure Domains

On your domain provider, access the DNS zone for your domain name (e.g. yourdomain.tld), and you just add or modify the A record (and/or the AAAA record, for IPv6) to point to your server IP address.

Preferably, you will also add a Canonical Name (CNAME) record for the popular subdomain variation www.yourdomain.tld that is still used by many users to navigate to websites:

$ORIGIN yourdomain.tld.
(...)
yourdomain.tld. 3600 IN A ipaddress(v4)
yourdomain.tld. 3600 IN AAAA ipaddress(v6)
(...)
www.yourdomain.tld. 3600 IN CNAME yourdomain.tld.
(...)

Once done, it can take a while until these DNS records propagate across the Internet, and you can check when that becomes active from any console (e.g. DOS)

from any machine:
nslookup yourdomain.tld

Update Firewall

Now you need to update the firewall rules configured in for the basic server setup. Do that using the following commands:

on your remote SSH session:
sudo ufw allow proto tcp from any to any port 80 comment 'HTTP Port'
sudo ufw allow proto tcp from any to any port 443 comment 'HTTPS Port'

Now the server will be able to accept incoming requests in these two standard ports. Feel free to check that the new rules are active with:

on your remote SSH session:
sudo ufw status verbose