I recently changed my magento to use HTTPS for all secure and unsecure urls. The one thing I notice is that all my internal links are set to HTTP instead of HTTPS, which slows down the website since the requestes are getting redirect to HTTPS.

Any ideas on how to set the internal link to HTTPS


2 Answers 2


If you create or edit CMS pages or blocks, please make sure that you always use directives and don't include a complete URL.

This has the following advantages:

  • switching to SSL works without anything having to be edited
  • the links will always work, on staging, local, live, elsewhere

For links ( tags) you should do this:

<a href="{{store direct_url='page.html'}}">page name</a>

This becomes e. g. https://www.yourdomain.com/page.html

For pictures ( tags) please do as follows:

<img src="{{media url='wysiwyg/products/pic.jpg'}}" alt="your description of picture" />

This becomes e. g. https://www.yourdomain.com/media/wysiwyg/products/pic.jpg

  • Definitely a good idea to use this structuring. Also helps in multistore when you have a CMS page available to all store views <a href="{{store url="link-here"}}" >link text</a>
    – Steven J
    Sep 7, 2017 at 17:03

If all your links are relative then setting the unsecure and secure urls to https should work but if all your internal links are absolute, you have to go through and change them to https

  • Thanks for your reply. They are relative. I have not made any changes to magento original code. Nov 17, 2016 at 1:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.