Welcome to WordPress Community Forum. Please login or sign up.

Nov 25, 2024, 12:28 PM

Login with username, password and session length

Shoutbox


Recent

Members
Stats
  • Total Posts: 55
  • Total Topics: 45
  • Online today: 5
  • Online ever: 136 (Apr 17, 2022, 11:37 PM)
Users Online
  • Users: 0
  • Guests: 14
  • Total: 14
14 Guests, 0 Users

Redirect to HTTPs in WordPress

Started by Chris, Feb 28, 2022, 01:55 AM

Previous topic - Next topic

WordPress Premium Themes


Chris

Hi,

I have enabled SSL for my website and now I want to redirect it to HTTPs. How can I do it? I don't want to mess up as website this website is live.

Thanks,

Kailash

Hello,

You can follow the below procedure:

[1] Make sure that SSL is installed properly on your website.

[2] Update your URL from your WordPress Admin area -> Settings -> General

[3] If you are on Linux server with Apache, you can use .htaccess to force redirect HTTP to HTTPs using following .htaccess rule:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

For more information on force HTTPs redirection, you can refer Redirect HTTP to HTTPS rewrite rule KB article.

- Kailash

WordPress Premium Themes