I have a website hosted on my homelab that I exposed to the internet a year ago and due to my registrar Freenom having legal issues I was not able to renew the domain, I haven't had time to focus on it due to being busy however now I am planning on taking the site live again.

My current problem is I am unable to access the website even though it's currently hosted locally as the domain has expired. I've tried mapping the domain using the hosts file however it just redirects me to the apache start page

Here is what my hosts file looks Like this is on a windows client exampladomain.com

Here is the apache server config running on Ubunto Server 20.4

<VirtualHost *:80>
    ServerName exampledomain.com
    ServerAdmin admin@exampledomain
    DocumentRoot /var/www/html/exampledomain
    <Directory /var/www/html/exampledomain>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    LogLevel info ssl:warn
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

I've disabled the SSL config as the certificate is now invalid

is there an easy way to access the website using the domain without me having to setup a DNS server?

  • That hosts entry looks fine to me. I would say to add the www version to the hosts file as well, but afaik the fact that Apache is serving up its start page to you means www isn't the issue here. To me this is looking more like a server configuration issue than a hosts file issue at this point. Please edit your question to include the OSes you're working with (presumably Apache is on Linux, but it could be helpful to readers to know what OS you're doing hosts file work on). Thanks! Commented May 15 at 14:56
  • added the systems and configs as requested
    – Aleytia
    Commented May 15 at 16:31
  • your hosts file should let you access the site without configuring a DNS server. Does it not work for you? Commented May 15 at 21:26
  • it redirects to the apache start page, I figured it would have just taken me to the page but it doesn't
    – Aleytia
    Commented May 16 at 2:11

1 Answer 1


I seem to have fixed the problem by disabling secure DNS on Chrome

Settings >>> Privacy and Security >>> Security >>> Use Secure DNS

This is apparently not allowing the edits done on the hosts file which means chrome does not know how to resolve the domain

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.