Sign in Sign Up

We use cookies to make Serpstat better. By clicking "Accept and Continue", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.

By using the website, you agree to our Privacy policy

Report a bug

How-to 4 min read October 2, 2019

How to set redirect 301 from HTTP to HTTPS site version

In order to set redirect 301 from http to https, it is necessary to make modifications in the file .htaccess in the root folder of the site. This is done after installing the SSL certificate. Correctly set redirect enables the full indexing when relocating the site to the https version.

When is redirecting from http to https necessary?

It is the final step by transferring the site from http to https version. After the setting redirect 301 of all pages, installing SSL certificate is considered complete.

To improve indexing and prevent errors, it is recommended to check for having redirect on all pages. Two identical URL with http and https can be recognized as duplicates, and the weight will not be transferred. The page weight will decrease because of interlinking to https version. Ideally, all pages should forward a user from http to https automatically.

By interlinking in the text, the links also should forward to updated pages. None of the links can forward to the addresses with http version. To detect incorrectly set redirects and interlinking fragments, use Serpstat's audit or the same tools. This way, you can quickly and precisely define pages with an incorrectly set redirect.
HTTPS site audit in Serpstat

How to set correctly redirect 301 from http to https?

Let us suppose that you ordered an SSL certificate from your hosting provider, and it is automatically provided to your site. Before you start, ask for customer service, how is better to set redirect 301 from http to https for your specific case.

If you installed a safety certificate yourself, it is necessary to add the command in the file .htaccess. It is located in the root folder of the site, which you can reach through the file manager or hosting management system.

The file location in the Plesk panel looks in the following way:
htaccess file in the root folder of a site
By opening it in any text editor, add one of the commands in the next line after Rewrite Engine On directive:
Setting up redirects on https
Here instead of enter the name of the site that you work with:
 Rewrite Engine On when redirecting on HTTPS
Other variants of commands:
Redirect to https
Redirecting to https in htaccess
Adjusting redirection to the https version of the site
301 redirect from http to https
Switching redirect to https version of the website
It is also possible to set redirect 301 via .htaccess for only one page. The name .htaccess is presented as an example, replace it with the address of the right page. Use only one among presented variants:
301 redirect for one page
301 redirect for one page in htaccess


The redirects setting from http to https should be done after installing an SSL certificate to the site. Firstly, ask the hosting support, which method of redirection setting is actual in your case. If you are going to set redirect https to http manually, use the file .htaccess. Add different commands in turn, checking each of them by entering the address with http.

If all links with http forward to https without errors, the installing SSL certificate should be considered completed.
This article is a part of Serpstat's "Site Audit" tool
SEO Audit in Serpstat
Audit all the site or page in one click. A complete list of errors, sorted by severity, ways to resolve them and recommendations. Any frequency of verification and automatic email reports.
Run Site Audit

Learn how to get the most out of Serpstat

Want to get a personal demo, trial period or bunch of successful use cases?

Send a request and our expert will contact you ;)

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Share this article with your friends

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?


To complete your registration you need to enter your phone number


We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

Personal demonstration

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.




We are glad of your comment
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Спасибо, мы с вами свяжемся в ближайшее время

View Editing


You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits