0

I have installed SSL certificate and now when I access the website link to secure website CSS files are not loading. CSS files are loading in not secured url . Also url links inside the website returning 404:

Please help me solve this issue. I tried to deploy but that did not help.

  • Did you change the base URLs in Magento Admin to https as well? What does your configuration look like? – Anna Völkl Feb 22 '18 at 9:20
  • tried to change admin to secure but than got thrown out so switched back admin to unsecure. frontend is secure but css errors and links not working. – Yossi Bondasd Feb 22 '18 at 9:23
  • You need to update all URLs to https and then clear the cache. – Anna Völkl Feb 22 '18 at 9:24
  • Also: If you want to serve the whole shop via HTTPS also set: "Use Secure URLs on Storefront" to Yes. – Anna Völkl Feb 22 '18 at 9:25
  • they need to update automatically. what do you mean? – Yossi Bondasd Feb 22 '18 at 9:26
1

Make sure your configuration looks like this:

Stores > Configuration > General > Web:

Base URLs:

Base URLs (Secure):

  • Secure Base URL: https://www.yourdomain.com/
  • Secure Base Link URL: {{secure_base_url}}
  • Use Secure URLs on Storefront: Yes
  • Use Secure URLs in Admin: Yes
  • Enable HTTP Strict Transport Security (HSTS): Yes
  • Upgrade Insecure Requests: Yes

After changing the URLs, clear the cache! You might as well need to a new deployment and/or run bin/magento setup:static-content:deploy and clear the cache again.

  • Enable HTTP Strict Transport Security (HSTS): Yes Upgrade Insecure Requests: Yes. are not showing up on web section – Yossi Bondasd Feb 22 '18 at 9:50
  • maybe i have premissions issue? – Yossi Bondasd Feb 22 '18 at 9:54
  • You need to save the secure base url first and then reload the page. Then the 2 options will show up. – Anna Völkl Feb 22 '18 at 10:05
  • they dont show up.. – Yossi Bondasd Feb 22 '18 at 10:38
  • Which version of Magento 2.x is this? Actually they should show up. However, these 2 are security features which should be enabled when you run your shop via https but they have nothing to do with the fact that CSS is loaded via https in the frontend. – Anna Völkl Feb 22 '18 at 12:36

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.