LAMP CSS broken after installing SSL

September 16, 2018 560 views
LAMP Stack Ubuntu 18.04


I have installed on a droplet LAMP (one click install) and after that, i have uploaded my website files. Everything went smooth but i decided to install Let’s Encrypt SSL and now my site is working but without CSS.

I mean it loads like it doesn’t have CSS at all (tried multiple browsers) and i don’t know where to look and what to change.

PS: when i installed the SSL i chose this option:

“2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you’re confident your site works on HTTPS. You can undo this
change by editing your web server’s configuration.”

Thank You for your help.


1 Answer

Unless your CSS is inline, which isn’t recommended, it means that your CSS is being loaded from a separate file that you have linked to.

You want to ensure that this file is available via HTTPS at the expected URL as well, as all of the requests will be automatically directed to HTTPS instead of HTTP.

Most likely the way you were loading your CSS was through HTTP, and HTTPS isn’t setup which is why the request is failing and your CSS isn’t loading and displaying as expected.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!