Title: Advert Image source HTTP and HTTPS
Last modified: August 30, 2016

---

# Advert Image source HTTP and HTTPS

 *  Resolved [FrenchFries](https://wordpress.org/support/users/frenchfries/)
 * (@frenchfries)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/advert-image-source-http-and-https/)
 * Hello.
 * Been using this plugin for a little while and really happy with it.
 * Recently we have enabled HTTPS for the site where this plugin is used, but the
   advert images are being delivered over HTTP and not HTTPS, so the Chrome browser
   warns about this and the green padlock in the address bar disappears, making 
   the site look more insecure.
 * The ad images are stored in wp-content/banners and I am using the %image% variable
   place-holder for the AdCode like this:
    `<a href="/product/office-365/"><img 
   src="%image%" /></a>`
 * The HTML generated on the page for the img src is always [http://&#8230](http://&#8230);
   even if the page is viewed over HTTPS.
 * Is there a way to format the AdCode so that when the page is viewed over HTTP
   the advert image is retrieved over HTTP and when the page is viewed over HTTPS
   the advert image is also retrieved over HTTPS?
 * I think I have already tried a relative link to the banner in the AdCode, like“/
   wp-content/banners/advert.jpg” instead of %image%, but the banner then failed
   to show up on the page.
 * Thank-you,
    Paul
 * [https://wordpress.org/plugins/adrotate/](https://wordpress.org/plugins/adrotate/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/advert-image-source-http-and-https/#post-6767416)
 * If your site is using HTTPS there is no reason for people to still use HTTP.
   
   Why not fix that issue and redirect all of your visitors to HTTPS 🙂 This not
   only fixes your unsecured content issue, but it also looks more professional 
   in general.
 * This Article I wrote a while ago will help you achieve just that; [https://ajdg.solutions/2015/03/30/switching-your-wordpress-site-to-ssl/](https://ajdg.solutions/2015/03/30/switching-your-wordpress-site-to-ssl/)
 * Also, letting the browser figure out what protocol to use is never a good idea.
   If you use full urls (which include [https://](https://wordpress.org/support/topic/advert-image-source-http-and-https/?output_format=md))
   you will fix the issue too. Using agnostic urls (using //) may work against you
   as well – Chrome and Safari are kinda dumb with them.

Viewing 1 replies (of 1 total)

The topic ‘Advert Image source HTTP and HTTPS’ is closed to new replies.

 * ![](https://ps.w.org/adrotate/assets/icon-256x256.gif?rev=3117289)
 * [AdRotate Banner Manager](https://wordpress.org/plugins/adrotate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adrotate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adrotate/)
 * [Active Topics](https://wordpress.org/support/plugin/adrotate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adrotate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adrotate/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Arnan](https://wordpress.org/support/users/adegans/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/advert-image-source-http-and-https/#post-6767416)
 * Status: resolved