Question

Why can I not access my Domain through my web browser, but can access the server via IP?

I have been following the process to get my domain setup with a SSL certificate, following the guides here: https://docs.digitalocean.com/support/how-do-i-install-an-ssl-certificate-on-a-droplet/ https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04

I have a Virtual Host setup through apache, have setup my config block per the guide with my domain: “margotwolfe.dev” and enabled the config file. Apache is able to serve the domain when pinging (reads back the correct IP address of the server) but is inaccessible via “http://margotwolfe.dev” or “http://www.margotwolfe.dev

I have Type A DNS records setup through the DigitalOcean control panel, and UFW through the CLI for firewall. Unsure if that is causing my complications or not.

Any and all help is appreciated.


Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
February 7, 2025

Heya,

Check Your Apache VirtualHost Configuration.

Open the conf file for your domain, possible

sudo nano /etc/apache2/sites-available/margotwolfe.conf

or just go to the /etc/apache2/sites-available/ folder see what files you have inside. It most probably going to be the one. Open it.

You need to have

    ServerName margotwolfe.dev
    ServerAlias www.margotwolfe.dev

in the VirtualHost block. If you don’t add your domain to the ServerName and ServerAlias as shown before, save the file and restart Apache.

Bobby Iliev
Site Moderator
Site Moderator badge
February 7, 2025

Hi Margot,

The site seems to be loading as expected now. Is it still not working for you?

I did notice that the www version (www.margotwolfe.dev) is not secured by SSL. You’ll need to re-run Certbot to include both the www and non-www versions:

sudo certbot --apache -d margotwolfe.dev -d www.margotwolfe.dev

After that, restart Apache:

sudo systemctl restart apache2

Let me know if you need any more help!

- Bobbu

alexdo
Site Moderator
Site Moderator badge
February 7, 2025

Heya, @margotwolfe

The site is loading fine on my end. I would assume there was a DNS propagation or browser’s cache that could have also caused the issue for you.

Regards

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.