Updated on Oct 10, 2022
Table of Contents:
An HTTP cookie is a little piece of data delivered from one webpage or website to another. When the user browses, their web browser saves this little data to their computer.
The idea behind this method is to reduce server latency by minimizing the number of queries, which can have a minor influence on the speed of your website.
We have already covered the steps needed to configure the PrestaShop Media Server URL on the cPanel hosting account, but many customers face an issue when having this setup while using an SSL certificate for their stores. The reason for the issue is that usually, the SSL is valid for their main domain
www.example.com and does not cover the Media Server subdomain used for cookie-free URLs. In this situation, you will be forced to either:
Both solutions have drawbacks: the WildCard SSL may be expensive, especially if you do not require SSL for your subdomains, and the Cloudflare CDN applies security cookies to all content processed through their network, so you will still have cookies applied to your static content with the second option.
Most hosting providers support the Apache
mod_userdir, which allows you to access your account via the server hostname using a URL such as
http://hostname/~username where the
‘hostname’ is the server hostname and the
‘username’ is your cPanel username.
Additionally, most hosting providers, including FastComet, have a valid and trusted SSL certificate installed for the server hostname, usually advertised as Shared SSL. In many cases, the Shared SSL is almost useless as you will most probably not want to have your website accessed via a third-party URL different from your domain name. In this case, however, the Shared SSL can be great for processing your static content via the cookie-free domain and still keep it secure via HTTPS.
Unfortunately, PrestaShop does not accept URLs, including the ‘~’ character for the media server settings, but with just a quick trick, you can set this.
Before changing any settings on your PrestaShop installation, make sure your account is accessible via mod_userdir, and a valid SSL is available on your hosting server. You may contact your host and consult if this option is available for you. All FastComet clients on our PrestaShop Hosting plans can take advantage of this feature completely free of charge.
If your host supports mod_userdir and has a valid SSL, you can proceed to your PrestaShop admin panel, Performance section, under the Advanced Parameters menu. Scroll to the Media Servers section and input any dummy URL, such as:
When it comes to help, we’re always ready to provide it. Contact our technical support team for assistance whenever you need it. You can do that by opening a new support ticket. Our job is to ensure that your online project is successful.
We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!