Can't access site after adding SSL (Please help)

Posted November 30, 2017 2.6k views
ApacheUbuntu 16.04

Hi everyone! This is my first time using digital ocean. My wordpress site was working great until I decided to go for an SSL. First I went with and after completing the setup I found an error when going to my site which was:

This site is unreachable
The server rejected the connection.

I decided to delete the wordpress site and start from scratch but this time I tried which resulted in the same problem! Can someone give me a helping hand? I’ve been sitting here for hours trying to figure something out. I have no idea what to do.


I went into
sudo nano/etc/hosts
and I added under localhost.

Now I can access my site but only by going to “”
www. and IP is not working.

Any help would be appreciated :)

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.

Submit an Answer
1 answer

“The server rejected the connection” means either your web server isn’t running (the rejection is performed by the server machine itself, as nothing is listening on the http/https port) or isn’t listening on the correct port.

The first step to diagnose this would be to start the webserver, verify that it fails to start, and then look at any error output in logs. With apache, you have apache2ctl configtest that will tell you what’s wrong with your configuration syntax.