If you have a secure certificate (SSL) on your WordPress website, you can automatically redirect visitors to the secured (HTTPS) version of your website to make sure their information is protected.
Note: Several plug-ins are available for WordPress that can redirect your URL automatically after you have installed your SSL certificate. For help with WordPress plugins, see wp.org
Warning: These instructions do not apply to SSLs installed on Managed WordPress. The HTTPS redirect is automatically enabled after the SSL certificate install finishes on a Managed WordPress account.
- Log in to your WordPress admin panel.
- Click Settings and then General.
- Change your WordPress URL and Site URL from http://coolexample.com to https://coolexample.com(you will need to substitute your domain name for coolexample.com) and click Save Changes.
- Create a
.htaccess
file in your webroot or public_html folder. - Insert the code listed below into your
.htaccess
file and save the file.
# BEGIN GD-SSLOptions +FollowSymLinksRewriteEngine OnRewriteCond %{HTTPS} !=onRewriteCond %{HTTP_USER_AGENT} ^(.+)$RewriteCond %{SERVER_NAME} ^coolexample\.com$ [OR]RewriteCond %{SERVER_NAME} ^www\.coolexample\.com$RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]Header add Strict-Transport-Security "max-age=300"# END GD-SSL# BEGIN WordPressRewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]# END WordPressMore info