Title: Insecure http used instead of https
Last modified: June 24, 2017

---

# Insecure http used instead of https

 *  Resolved [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/insecure-http-used-instead-of-https/)
 * I’m trying to resolve a mixed content error where Advanced Ads loads a .js file
   using http rather than https, but the fix I’m attempting has no effect.
 * The error in Chrome Inspector says:
 * Mixed Content: The page at ‘[https://www.westernlegendsroundup.com/&#8217](https://www.westernlegendsroundup.com/&#8217);
   was loaded over HTTPS, but requested an insecure script ‘[http://www.westernlegendsroundup.com/wp-content/plugins/advanced-ads/admin/assets/js/advertisement.js&#8217](http://www.westernlegendsroundup.com/wp-content/plugins/advanced-ads/admin/assets/js/advertisement.js&#8217);.
   This request has been blocked; the content must be served over HTTPS.
 * So I found in the plugin where I believe the protocol is specified. It’s this
   line in **advanced-ads/advanced-ads.php**
 * `define( 'ADVADS_BASE_URL', plugin_dir_url( __FILE__ ) );`
 * Which I changed to replace http with https using this code:
 * `define( 'ADVADS_BASE_URL', str_replace("/^http:/i", "https:", plugin_dir_url(
   __FILE__ )) );`
 * as an experiment to see if that would fix the problem. It didn’t. Can you update
   the plugin to ensure it takes on the https protocol if that’s what the user/browser
   is specifying?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/insecure-http-used-instead-of-https/#post-9259242)
 * Hi rcwatson,
 * thanks for investigating the issue.
 * I am pretty sure that Advanced Ads is configured correctly here, especially since
   you are the first to reach out with such a problem and I myself run almost all
   our sites with Advanced Ads on HTTPS only and can not confirm this.
 * My best guess right now would be that your HTTPS setup is partially incorrect.
   Do other JS files load fine?
 * Are you using a plugin to enable HTTPS or one to optimize such files?
 * Thanks
    Thomas
 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/insecure-http-used-instead-of-https/#post-9308041)
 * Hi rcwatson, have you been able to resolve this?
 * Thomas

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Insecure http used instead of https’ is closed to new replies.

 * ![](https://ps.w.org/advanced-ads/assets/icon-256x256.gif?rev=2773443)
 * [Advanced Ads – Ad Manager & AdSense](https://wordpress.org/plugins/advanced-ads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-ads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-ads/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-ads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-ads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-ads/reviews/)

## Tags

 * [HTTP](https://wordpress.org/support/topic-tag/http/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 2 replies
 * 2 participants
 * Last reply from: [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/insecure-http-used-instead-of-https/#post-9308041)
 * Status: resolved