cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts about Varnish cache in Magento 2: Can I use it on a web with HTTPS?

Doubts about Varnish cache in Magento 2: Can I use it on a web with HTTPS?

Currently I am developing a store on magento 2.3.1, I focus on improving the loading speed of it, I understand that Varnish cache is a recommended solution when optimizing this aspect. I have also read in the official Magento 2 documentation that Varnish does not support HTTPS connections, so I do have some doubts:

 

1) Does this mean that if my website has an HTTPS connection, it will be impossible to use Varnish cache?

 

2) If it is not possible to use Varnish with HTTPS websites, then why is it considered a good option for Magento? being that it does not make much sense to have an ecommerce that does not offer SSL security levels.

 

3) Are there alternative solutions or tools to Varnish cache that suit an aweb with HTTPS?

 

I have not implemented Varnish cache before on a website and although I have read some information online, these are not clear to me. It would be great if someone with experience in this matter could guide me. I'll be very greatful.

4 REPLIES 4

Re: Doubts about Varnish cache in Magento 2: Can I use it on a web with HTTPS?

@luis_suarez2  Good questions!

 

Your answer is below.

  1. Yes it is possible to use varnish cache if your website has an HTTPS connection.
  2. It is possible to use with HTTPS. and why it is it considered a good option for Magento because when we open any website for the first time, the data is fetched directly from the server. It takes a long time for content to load. If we use Varnish cache, Varnish itself stores the data. Now when the user requests data, it comes from Varnish and also from the browser cache.
  3. Follow this step to configure with HTTPS Install and configure Varnish cache with HTTPS
If Issue Solved, Click Kudos/Accept As solutions.

Re: Doubts about Varnish cache in Magento 2: Can I use it on a web with HTTPS?

Thank you very much for the detailed documentation! I have looked at it a bit and I see that we must take care in the selection of connection ports. Here another question arises.

 

Currently the ecommerce in developments is on an IP, so its connection is HTTP, but at the time of going to production the web will be addressed with a specific domain with HTTPS connection.

 

Would you recommend installing Varnish after having addressed the ecommerce to the domain with SSL? or do you consider that I will not have any inconvenience if I decide to install now with HTTP and then I migrate to HTTPS?

Re: Doubts about Varnish cache in Magento 2: Can I use it on a web with HTTPS?

Yes! I think you can go for now with simple HTTP configuration with your development instance, so you can test with varnish compatibility. after that, in your production instance, you can migrate varnish configuration with HTTPS. so your final output on live instance is compatible with both HTTP & HTTPS.

If Issue Solved, Click Kudos/Accept As solutions.

Re: Doubts about Varnish cache in Magento 2: Can I use it on a web with HTTPS?

One of the best ways to increase the performance of Magento 2 is to use a Varnish cache. It is a widely recognized HTTP accelerator method that makes it simpler to cache the requests.

 

Read more details here about:- How to Configure Varnish for Magento 2