The scenario I'm using to write this tutorial is that I'm creating a private test website for the mattifesto.com website. Adjust the domains for your situation.
To complete this task you should have already created a private test web server. This web server should have a public domain name which points to the web server's private IP address on your local network. The web server's domain name in this example is:
You should choose a domain for your private test website by adding one subdomain to this domain, such as:
This domain should be given a public CNAME record that points to the web server domain.