How to handle the most common Magento SSL Issues?

0
3046

Magento is a popular E-commerce software that is in use today. It is a perfect platform that offers an excellent experience and optimal performance. You must perform some adjustments to your Magento Website to ensure its operational efficiency. Occasionally a few issues will crop up that will call for appropriate measures to deal with. This article provides some of the Magento SSL issues and tips on how to deal with them.

Magento Secure Socket Layer (SSL) Not working

Installing a Secure Socket Layer like Comodo SSL on Magento store ensures that there is a secure flow of data between the Magento website and your customers. However, there are possibly three causes that might lead to the failure of your Magento SSL. In such a situation, you will get a notification that ‘Magento SSL is not working.’ The possible causes for these are; That the SSL is not activated, there is an issue with the database, there is a problem with the ajax call setup, or there is a problem with the setup of the third-party URL call.

secure socker layer (SSL)
How to activate Secure Socker Layer (SSL)?

If the Magento SSL is not activated, you should follow the following steps to activate it in Magento store.

  1. Navigate to systems> configuration> general web.
  2. Click on the tab indicated Secure.
  3. Select the yes option for Use Secure URLs in the frontend.
  4. Select yes for the option Use Secure URLs in the admin.
  5. Lastly, you should check the offload header as SSL_OFFLOADED.

If this issue is not resolved after following these steps, then the problem might be with the database. To resolve this, you should follow the following steps.

  1. choose core_config_data.
  2. Run this query: Select * from core_config_data wherepath = ‘%web/secure/base_url%’;
  3. You should confirm the value column to make sure that it is HTTPS, which means that the admin setup was successful, and that the SSL will work.

If the two solutions fail, then there might be a problem with the ajax call setup. To solve this, the code: echo Mage::getUrl(‘MYMODULE/MYCONTROLLER/MYACTION’, array(‘_secure’ => Mage::app()->getStore()->isCurrentlySecure())); should be used.

A third-party URL call could also be the issue. To solve this, you must change the URL from HTTPS://www.myexample.com to HTTP://www.myexample.com. The S after HTTP should be eliminated. 

Magento SSL Checkout Page Redirected to The Homepage

SSL Checkout Page redirected to homepage
How to handle when SSL Checkout Page Redirected to Hompage?

When this kind of issue arises, it means that Magento is not working correctly. The problem may lead to the check-out page redirecting to other pages such as the index page or the home page. To solve this issue, use the following tips that are applicable to all Magento versions.

  1. Have an SSL certificate like the Comodo SSL installed on the Magento website.
  2. Navigate to Admin > System > Configuration > General > Web.
  3. Go to secure settings and ensure that the base link is not altered. It should remain as {{secure_base_url}}
  4. Do not change the JavaScript, skin, or media settings. They should remain as: {{secure_base_url}}skin/etc.
  5. For the option Use Secure URL for frontend, select YES.
  6. Click on save to finalize on the settings.

Unable to Get Local Issuer Certificate

“SSL certificate problem: unable to get local issuer certificate” pops up when the cURL is unable to find a cacert.pem file.

When this kind of issue arises, you should follow the following steps to solve it:

  1. Create a copy of certs. This copy should be stored in a secure location on the server.
  2. Have ini. updated. To do this, you should use the following codes:

[[CA Certs]

cainfo=”C:/xampp/htdocs/_certs/ca-bundle.crt”

cafile=”C:/xampp/htdocs/_certs/ca-bundle.crt”

  1. Update the file depending on the location of you saved it.
  2. You should then restart the server.

Unable to access the admin after the installation of Magento SSL

Magento Admin log in
Can not log in Magento Amin Account Issue

In such a situation, two solutions are applicable. You can either add the entry: web/secure/use_in_adminhtml  into the core_config_data. It can be done manually. Insert below SQL query: 

INSERT INTO core_config_data (scope,scope_id,path,value) VALUES (‘default’,0,’web/secure/use_in_adminhtml’,1); 

You can also change the URL back to HTTP://your.domain.com/. In both cases, you must delete the cached data by erasing the /var/cache.

Magento 404 Page Not Found with SSL

Magento SSL Issues
Impossible to find out Magento with SSL

This error arises when the configuration file for SSL is not found. To resolve this error, you must use the following steps:

You should first get access to the SSL configuration file by using the command: sudonano /etc/apache2/sites-available/default-ssl. 

You then should Change ‘AllowOverride None’ to ‘AllowOverride All’ 

Finally have the server restarted using the command: 

sudo /etc/init.d/apache2 Restart. Once you are done, you are good to go.

403 (Forbidden) Error in Admin

This error indicates there is forbidden access to the page that the user is trying to access. The reasons for this can be that the Permissions are not properly set, or there is an inappropriate definition of the directory index. Where the permission has not been properly set, you should use standard 755 for directories, which allows you to operate the Magento website as the owner. For the inappropriate definition of the directory index, you should use a standard PHP setup as indexindex.htmlindex.htmindex.php;

HTTP vs. Https Duplicate Content Issues

Magento content duplicate issues
How to deal with copied content problem?

There are three ways to solve this issue. First, you can make use of canonical elements that are added to the head tags of web pages. 

The link rel=”canonical” href=”HTTP://www.domain.com/star-wars/toys/cut-outs/luke-skywalker.html”/> should be added.

You can also Serve a Different Robots.txt for HTTPS. To do this, you should follow the following procedure:

  • Make Use Of .htaccess to serve the two different Robots.txt files. Save the regular non-secure HTTP file as robots.txt and save the secure HTTPS file as robots_ssl.txt
  • htaccess file: should be made to look like this:
123RewriteEngine onRewriteCond %{SERVER_PORT} ^443$RewriteRule ^robots\.txt$ robots_ssl.txt [L]

Infinite Redirect Loop When SSL in Magento Is Activated in Magento Admin Area

When this issue occurs, you must follow the following path; app/code/core/Mage/Core/Model/Store.php

SSL-HTTPS Frontend Layout Problem

To solve this issue, you must remove the HTTP from the Base URL in the insecure section of the configuration. You then should add the HTTPS in the secured section and reload the cache. 

Can’t Log in to Admin After Enabling SSL

to fix this issue, you should follow the following procedure:

  1. go to the database.
  2. In core_config_data table, change the value field to 0 with the path of web/secure/use_in_admindata. Do the same thing for the path of web/secure/use_in_frontend.
  3. Sign into your hosting account using SSH and write the following command: 

rm -rf ~/public_html/magento/var/cache

Conclusion

This article has explained some common Magento SSL issues and their possible solutions. If you follow the steps in solving these issues, you will have your Magento site function optimally.

NO COMMENTS

LEAVE A REPLY

*