8 Quick Magento Store Tactics To Protect Your Store in 2020

According to a recent survey, nearly 30,000 websites are at peer risk every single day. Security scans performed on over 250,000 Magento stores illustrates that approx 75% of the online stores are at high risk from a cyber intruder. 1% of which fall in the critical risk area. Despite Magento being a relatively stable and secure CMS, it isn’t entirely immune to security threats. But the good news is, there are Magento security tactics available that you can maneuver to bolt your web store against potential security hacks. Find out what they are in this post.

10 Magento Security Tactics for your Magento store

1.Backup your Magento store data

System backups on Magento stores are very important to save your database and reform them when needed. You can always backup your Magento store data using the control panel provided within the system settings. Follow the instructions given below to back up your Magento data in an orderly way.

Magento backup Security

Source: mageplaza.com

  • Right on the administrator sidebar, select System > Tools > Backups.
  • On the top right side, select System backup to backup the entire web-ecosystem including your website database, system settings, and media folders. In the System backup segment, choose the preferable name to save the backup file. Note: letters comprising (a-z or A-Z), numbers (0-9) or spaces are only validated.
  • Once done with the backup name, choose the Maintenance mode for the smooth running of your website during backup.
  • Finally, Click on OKAY to begin the backup.
  • Once the backup is done, it can be found on the var/backups/ folder.

2. Restrict admin access by IP address

You can restrict admin access by IP address by adding the following codes in the .htaccess file.

RewriteCond %{REQUEST_URI} ^/(index.php/)?admin/ [NC,OR] RewriteCond %{REQUEST_URI} ^/downloader/ [NC] RewriteCond %{REMOTE_ADDR} !^my.ip.add.ress RewriteRule ^(.*)$ http://%{HTTP_HOST}/ [R=302,L]

An even better way to restrict your Magento backend access is to change default admin URL and user permissions.

3. Use Two-Factor Authentication

Two-factor authentication is one of the best Magento security tactics to include in your security checklist. It uses a double layer of the verification process to authorize the login of a user. For example, while using your debit card for online transactions, you first need to enter the CVV detail and an OTP will be sent to your registered mobile number, without which your transaction will be incomplete. TFA prevents your business against fraud orders, illegitimate account access and safeguards both you and your user.

4. Block bad bots

To protect your store from brute-force attacks and DDoS, it is important to detect and block bad bots from reaching your server. Although there are different kinds of extensions that stop bad bots, one that works at the server level is preferred. Or you can get a dedicated Security solution with an end-point firewall for your Magento store that blocks any such requests in real-time.

If you are a developer and have a way with coding, here’s how you can block multiple user strings using the .htaccess file. Just add the following code in your .htaccess file and you’re good to go.

RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(agent1|Wget|Catall Spider).*$ [NC] RewriteRule .* – [F,L]

5.Disable Any Dangerous PHP Functions

PHP files and functions are vulnerable to various exploits persistent in the open source community, including — RCE, Web Shell Upload, Backdoor Injection and so on. In order to avoid the exploitation of any PHP function, you must add the following code of rule in your system config PHP.ini file

file: disable_functions = proc_open,phpinfo,show_source,system,shell_exec,passthru,exec,open.

6. Use HTTPS/SSL for backend

HTTP/SSL is the additional layer of security that helps in strengthening your overall Magento security. In most of the cases, it is seen that people use a public hotspot or unencrypted wireless connection that can be used by hackers to intercept your connection and see all your personal credentials. Therefore, to eradicate this threat, we recommend you use an HTTPS/SSL in Magento to secure the connection.

To get a secure HTTPS/SSL URL:

  • Right on the top of the Administrator section, select Store > Settings > Configuration.
  • On the left of the control panel, select General > Web.
  • Extend the Base URLs segment and select “Yes” for the Use of encrypted URLs on Storefront.
  • Once you are done with the settings, click on Save config.

7. Change backend URL

Replacing your default administrator URL is one of the best ways to keep your site secure from cyber intruders. Therefore, to allow this function in the system, Magento introduced Magento 2.0 that allows you to modify your blackened URL and helps you harden the security of your store. Below mentioned are the steps that guide you throughout the process.

admin base url

Source: mageplaza.com

  • Right of the administrator section, select Store > Settings > Configuration.
  • On the left of the control panel, select Advanced > Admin.
  • Extend the Administrator Base URL section and append settings.
  • In the Use Custom Admin URL field, select “Yes” then fill in the Custom Admin URL field new Admin URL in the format of http://exampledomain.com/magento/ to append the new Administrator URL.
  • In the Use Custom Admin Path field, select “Yes” then fill in the Custom Admin Path field new Admin Path to adopt the new Admin Path.
  • Once you are done with the settings, click on Save config
  • Once the new URL is amended, verify it by logging in and check whether it is working or not.

8.PCI Compliance Checklist

PCI-DSS or Payment Card Industry Data Security Standard is a set of guidelines that major credit card companies put forward to prevent credit card frauds. It is perhaps the most important e-commerce payment security method on the list.

Your PCI compliance checklist should include the following:

  • Always use a WAF between the payment gateway and the open network. Also, keep the firewall updated with the latest updates.
  • Abide using default passwords supplied by the service vendor used in your network equipment.
  • Avoid storing cardholder data. In case you store then you must use strong encryption.
  • Use encryption for the transmission of the data that contains Cardholder’s information.
  • Assign a new session ID after each payment request to the server.
  • Try to restrict access to the administrator account to as few people as possible.


Abiding the use of the above-mentioned practices may wreak havoc on your websites. The above-mentioned steps are the best way to secure your Magento websites. However, More so it’s quite complex for small businesses and organizations to run VAPT on their websites. It’s somehow challenging to audit or even eliminate the threats with precise care.

Read more:Six Effective Ways To Stop The Error Of IMS Service Has Stopped Pop Up

Photo of author

Shashank Jain

Shashank Jain, founder of good-name, a young and energetic entrepreneur has always been fond of technology. His liking for technology made him go for engineering in computers. During his studies, he learned & worked on different computer languages & OS including HBCD, Linux, etc. He also has a keen interest in ethical hacking.

Leave a Comment