0

I’ve just managed to set up my first site running from a home Ubuntu server. I successfully acquired an SSL certificate and it works, for the most part. One page on my site keeps displaying incorrectly (mixed content warning).

I believe I need to change http:// to https:// in one of my files. I’ve had a look at what the inspect element console says and it says the following: blocked loading mixed active content “http://example.com/css/write.css

loading mixed (insecure) display content “http://example.com/favicon.ico” on a secure page

How can I change these to https? Thanks, complete novice here!

H412H
  • 5
  • 2
  • 4

2 Answers2

0

You cannot load resources from http when your site is served via https. You'll have to change your resources to https. Just find and replace http within your source folder.

doct03
  • 111
  • 1
0

You can find which files contain the "http" reference using "grep"

If you are the owner of the files you can just use the grep command but if the files are owned by another user / process such as www-data or apache you will need to use sudo grep.

For example, if your web folder is /etc/www/html use the following;

sudo grep -r 'http://' /etc/www/html

You will get a list of files containing "http://". Note that you must use "http://" not "http" otherwise you will get results for http and https.

https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content

Edit the appropriate files and try again. Like any editing task you should make a backup of your files before proceeding.