chuyển từ http hang https


Switch from HTTP to HTTPS is an almost mandatory thing for WordPress websites these days. Switching to HTTPS will help your website gain many benefits. For example: better security, avoid hacker attacks, fake website status, etc. Today let’s learn WordPress to learn how to convert HTTP to HTTPS

Why should the domain path be changed to https?

switch from http block https

  • When you use a domain name to run website data, emails, etc., chances are there will be security holes in the process that will attract hackers to attack. Using an SSL certificate helps protect your website data, email, and customer and order information.
  • Allows to secure and encrypt the messages exchanged between the web browser and the data storage server
  • Prove the existence of your business, avoid website spoofing.
  • Secure customer and company transaction information, helping to improve company reputation. Increase customer confidence in the website. At the same time, increase the number and value of online customer transactions.

Note before switching from HTTP to HTTPS

Before switch from HTTP to HTTPS, you should back up your WordPress site data to restore it in case something goes wrong. Next, install the SSL certificate on the hosting. Currently, there are 2 types of SSL, free and paid. With the free type of SSL, you have to renew it every 3 months. As for the paid type, you will have to buy it annually and have an additional insurance package integrated by the provider.

Instructions for switching from HTTP to HTTPS

Use plugins to switch from HTTP to HTTPS

Please install the Really Simple SSL plugin to switch from HTTP to HTTPS. All you need to do is log into the WordPress admin page, go to the Plugins section on the left, and find the plugin you need to install.

forward http block https

After successfully installing the Simple Simple SSL plugin, enable it so that it can automatically scan for your website’s SSL. This plugin will then convert all HTTP URLs on your website to HTTPS.

toggle http block https wordpress

If you don’t want to use the plugin, you can manually switch from HTTP to HTTPS as follows.

How to manually switch from HTTP to HTTPS

Step 1: Edit the wp-config.php file.

Open the wp-config.php file and hover over /* That’s it, stop editing! Happy posting. */, then add the code as shown below.

http to https wordpress

Then click save changes. After that, login to the WordPress admin page and manually install the site links, by going to Settings, select General. Once you’re done editing, drag your mouse to the bottom of the page and click Save Changes to update the settings.

Step 2: Modify the path in the database

You use the Better Search Replace plugin to modify the paths in the database. You just need to download the plugin and install it.

convert http to https in wordpress

Once the installation is complete, click on activate the plugin. Then click on Tools, select Better Search Replace. Then change the path in the red box as shown below and you may need to do it manually to fix the image path. Finally, click Run Find/Replace.

switch from http to https in wordpress

Step 3: Configure HTTP to HTTPS htaccess

The .htaccess file is located in the root directory of your WordPress site. It contains configuration files for the permalink structure (static link). So you need to add the following rule to your htaccess file to be able to configure forwarding.

Rewrite engine enabled

RewriteCond %{HTTPS} disabled

Rewrite rule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The browser was therefore redirected to HTTPS. Now, if there is traffic to the site, the path will be HTTPS.

Change Essential Website Settings After Switching From HTTP to HTTPS WordPress

The last step you need to do is to change the essential settings to complete the transfer. change HTTP to HTTPS. That is, you update the sitemap link again. If you are using the Yoast SEO plugin, the sitemap link will be automatically updated by the plugin. However, after that, you need to adjust the sitemap link in the robots.txt file.

Next, you modify the Google Search Console information and add a new attribute for the HTTPs version of the website. Also, if you are implementing a CDN, remember to update all links to HTTPS.

In addition, you also need to make the change change url to https of the website in Google Analytics. And finally, fully update your social links to the HTTPS version.

See more : How to redirect URLs in WordPress?

How to switch from HTTP to HTTPS in cPanel

First, you need to install an SSL certificate for the website. You then use cPanel’s Force HTTPS Redirect feature to switch from HTTP to HTTPS.


Go to the cPanel admin page, hover over the domain section and select Domains. Here, a list of available domains will appear.

how to convert http to https

On the domain management interface page, enable the Force HTTPS Redirection property to change all HTTP protocols to HTTPS. This way you have completed the HTTPS transfer without having to install any plugins.

I hope the article on how switch from HTTP to HTTPS Today has brought you a lot of useful knowledge. Apply it to your website now. And don’t forget to follow the next publications of Learn WordPress Please.


Rate Items


Recommended Posts