Used this tutorial and created custom domain name for testing. But opening in browser shows page not found, only wne I use 127.0.1.1 it works. Do I have to use officially registered domain paid name? Or I just have to put it in /var/www as subfolder?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
HI @rulet,
You can use a domain that hasn’t been registered however you’ll need to edit the host file on your local computer to actually see it.
Let me give you some explanation what a hosts file is
First of all, the hosts file is a relic of the past. In the early days of the internet, the file was used to link domain names to certain IP addresses i.e. to ‘resolve’ them. For example, the hosts file made sure that the computer knew what IP address was meant by www.ionos.com. Therefore, the hosts file used to contain a long list of these hosts and their special addresses. The influence of the term ‘host’ is still noticeable today when you speak of ‘hosting a website’.
This means you have actually say to your computer the domain example.com to load from the IP of your droplet. That way you’ll be able to load the content of your website without even having a registered domain.
How to change the hosts file in Windows XP, 7, 8, and 10
How to change the hosts file on your Mac
How to change the hosts file in Linux/Ubuntu
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.