Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Implementing TLS for your websites, apps, services, and API is easier than ever with tools like Let’s Encrypt now in wide use. There’s no reason not to join the party!
Finding and Fixing Mixed Content Errors
When your web application is severed over HTTPS, you should make sure that all resources (Images, CSS, JavaScript) are linked to a secure source. If there are resources being served over an insecure connection, your visitors may see a "mixed content" warning. These include both internal and external (3rd Party) sources.
When a link is added with a FULL PATH, make sure it starts with HTTPS://.
Make sure all request are always served over HTTPS. This can be done on the server (apache, EngineX, IIS), CDN (such as Cloudflare) or with an .htaccess file.
Use the Content-Security-Policy-Report-Only header to monitor mixed content errors on your site.
Use the upgrade-insecure-requests CSP directive to protect your visitors from insecure content.
Checking Your Resources
Double check your site for insecure "mixed content" warnings. Here is an example of mixed content
Here's a simple tool that will tell you about any insecure items on your SSL page! whynopadlock.com
Chrome Developer Tools
- Open Developer Tools: View > Developer > Developer Tools
- Go to the "Security" tab
- If there are any errors or warning make sure the "Console" is open by clicking the errors or warnings in the top right. This will give you detail about which resources have issues
Firefox Developer Tools
- Open Developer Toolbar: Tools > Web Developer > Developer Toolbar
- Expand the toolbar by clicking any error
- Choose the "Console" tab to see details of insecure content
New Terms
- Self-Signed Certificate: a self-signed certificate is an SSL certificate that is not signed by a trusted, central authority in the SSL/TLS certificate ecosystem.
- Nginx and Apache: two of the more popular web server/proxies that you can run a web app over.
Added Security Note
Sometimes you may still receive a warning when all resources are being loaded via https. One possible culprit is a server that supports outdated security protocols. whynopadlock.com will also give you warnings about out dated protocols.
Documentation
OpenSSL
Let’s Encrypt
Cloudflare
Self-signed certificates
Further Reading
How To Secure Nginx with Let's Encrypt on Ubuntu - Digital Ocean
How To Secure Apache with Let's Encrypt on Ubuntu - Digital Ocean
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up