Visit Eventchamp WordPress theme to create a new events & conference website. Eventchamp WordPress Events Theme

How to Redirect HTTP to HTTPS in WordPress

Table of Contents

Are you looking to switch your WordPress site from HTTP to HTTPS? HTTPS is the secure version of the HTTP protocol used to transmit data on the internet. It encrypts the data being transmitted, making it more secure and less vulnerable to hacking or interception. HTTPS is the standard for secure websites, and many browsers now mark HTTP sites as “not secure” to warn users.

If you want to switch your WordPress site from HTTP to HTTPS, you will need to redirect all HTTP traffic to HTTPS. This ensures that your users are always accessing the secure version of your site, and it also helps prevent duplicate content issues and maintain your search engine rankings. In this article, we will explain how to redirect HTTP to HTTPS in WordPress, both with and without a plugin.

Why You Should Redirect HTTP to HTTPS in WordPress

There are several reasons why you should redirect:

  • Security: As mentioned above, HTTPS is a more secure protocol than HTTP. By redirecting HTTP to HTTPS, you can ensure that your users’ data is always transmitted securely.
  • SEO: Search engines prefer HTTPS sites over HTTP sites, and they may rank HTTPS sites higher in their search results. By redirecting HTTP to HTTPS, you can maintain or improve your search engine rankings.
  • Duplicate content: Having both HTTP and HTTPS versions of your site can cause duplicate content issues, which can hurt your search engine rankings. Redirecting HTTP to HTTPS helps prevent these issues and ensures that your content is only accessible on the HTTPS version of your site.

How to Redirect with a Plugin

How to Redirect HTTP to HTTPS in WordPress with a Plugin

The easiest way to redirect HTTP to HTTPS in WordPress is by using a plugin. There are several plugins available that can help you with this task, but we recommend using the Really Simple SSL plugin. Here’s how to use it:

  1. Install and activate the Really Simple SSL plugin. This plugin is available for free from the WordPress plugin repository.
  2. Once the plugin is activated, it will automatically redirect HTTP to HTTPS on your WordPress site. You can verify this by checking your site’s URL in the address bar of your browser. It should now start with “https://” instead of “http://”.

That’s it! Your WordPress site is now redirected from HTTP to HTTPS using the Really Simple SSL plugin.

How to Redirect HTTP to HTTPS in WordPress Without a Plugin

If you don’t want to use a plugin to redirect HTTP to HTTPS in WordPress, you can do it manually by editing your site’s .htaccess file. This method is slightly more technical and requires some knowledge of Apache web server configuration, but it is still relatively easy to do. Here’s how to do it:

Step 1: Backup Your Website

Before making any changes, always ensure that your website is backed up. This step is crucial to avoid any data loss during the transition process. You can backup your site using a tool provided by your hosting provider or by manually downloading your WordPress files and database.

Step 2: Update Your WordPress Address

Go to your WordPress admin dashboard and navigate to “Settings” > “General.” Here, update the “WordPress Address (URL)” and “Site Address (URL)” to include ‘https’ instead of ‘http’. For example, change “” to “” and save the changes.

Step 3: Modify the .htaccess File

This step involves accessing the .htaccess file, typically found in the root directory of your WordPress installation, and adding a few lines of code to enforce HTTPS. You can use an FTP client or file manager in your web hosting control panel to access this file.

Insert the following code snippet into your .htaccess file:

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>

Ensure that you save the changes after inserting the code snippet. This will redirect any HTTP traffic to the HTTPS version of your website.

Step 4: Update Google Search Console and Google Analytics

Don’t forget to update your website’s URL in the Google Search Console and Google Analytics (or any other search engine optimization and tracking tools you utilize). In Google Search Console, add a new property with the https version of your URL. In Google Analytics, navigate to “Admin” > “Property Settings” and update the default URL to HTTPS.

Step 5: Fix Mixed Content Issues

After enforcing HTTPS, scan your website for mixed content issues. Mixed content refers to secure HTTPS pages that contain elements loaded over insecure HTTP connections. Browsers may block such content or display security warnings to users. Utilize online tools to scan your site for mixed content and resolve them by ensuring that all elements (images, scripts, stylesheets, etc.) are loaded over HTTPS.

Step 6: Test

Check multiple pages on your website, especially those with forms or dynamic content, to ensure that all traffic is correctly being redirected to HTTPS and there are no security warnings or mixed content issues.

Securing your website with HTTPS is no longer optional; it’s a necessity. By redirecting HTTP to HTTPS without a plugin in WordPress, you safeguard user data, enhance trust, and adhere to SEO best practices. Always remember to backup your website before making changes, and thoroughly test to ensure a smooth and secure browsing experience for all users.

Katerina Valeria
Katerina Valeria
Hi there! My name is Catherine and I am a professional content creator with a focus on WordPress. I write blog articles for Gloria Themes, sharing my knowledge and expertise on all things related to this popular website platform.

Subscribe to Our Newsletter for Updates, Tips, and Offers


Hand-Picked Related Articles

If you’re looking for helpful tips and tricks on improve your WordPress website or improving your web design skills, be sure to check out our related articles for valuable insights and resources.

What Is a WordPress Slug?

Explore the depth of WordPress Slugs: potent SEO tools and navigational guides, crafting a seamless user journey while boosting visibility.