@creola.ebert
Enabling HTTPS for your Magento store is important for improving both security and SEO. Here's a step-by-step guide to enable HTTPS on your Magento store:
Prerequisites
- SSL Certificate: Purchase and install an SSL certificate on your server. If you're using a hosting provider, they often provide options for SSL certificates.
- Backup: Always backup your Magento store before making changes.
Steps to Enable HTTPS
Step 1: Install the SSL Certificate
- On your Server: Follow your web host’s guidelines to install the SSL certificate. This varies depending on whether your server is Apache, Nginx, etc.
Step 2: Update Base URLs
- Access Magento Admin Panel: Log in to your Magento Admin Dashboard.
- Navigate to Stores → Configuration.
- In the left panel, under General, select Web.
- Expand the Base URLs Section:
Change the Base URL to https://yourdomain.com/.
- Expand the Base URLs (Secure) Section:
Change the Secure Base URL to https://yourdomain.com/.
Set both Use Secure URLs on Storefront and Use Secure URLs in Admin to Yes.
- Save the Configuration.
Step 3: Clear Cache
- Go to System → Cache Management and clear the cache.
Step 4: Update .htaccess or Nginx Configuration
- To automatically redirect HTTP requests to HTTPS, update your .htaccess or Nginx configuration file.
For Apache (.htaccess):
1
2
3
|
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
For Nginx:
1
2
3
4
5
|
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}
|
Replace yourdomain.com
with your actual domain.
Step 5: Verify the Implementation
- Check your website using https://www.yourdomain.com to ensure it loads without any security warnings.
- Use online tools like SSL Checker to ensure your SSL certificate is correctly installed.
Step 6: Update Google Search Console
- Update your Google Search Console and any webmaster tools with the new HTTPS URLs.
Step 7: Update Links in CMS & Other Configurations
- Ensure that any hard-coded links in CMS pages, blocks, or modules are updated to HTTPS.
Step 8: Testing
- Test your entire site for mixed content errors, which occur when HTTPS pages try to load resources (images, scripts) over HTTP.
Enabling HTTPS on your Magento store can help improve user trust, protect sensitive information, and is now a ranking factor in Google search, positively affecting your SEO. Always keep an eye on how your store behaves and perform necessary tests to ensure seamless operation after enabling HTTPS.