Redirections settings sent my Http to https with 301, how I fix it.

#172692
  • Resolved Matsu
    Rank Math free

    I notice now that domain Http status is 301 and not 200.
    I see that on predictions settings panel is set to 301, I added this

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
    Header always set Content-Security-Policy “upgrade-insecure-requests;”

    to .htaccess
    How I now fix the restrictions, the aherfs crawler sending me an error about redirect chain.

    and how I disable it so in the future it will not happen again.

    Please advice
    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.

    I’ve checked your site, and it seems that all your URLs are already redirected with the final version HTTPS and without WWW. You can try this code in your .htaccess to redirect your website from http to https and www to non-www. (replace the website with your actual website name)

    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^www.website.com [NC]
    RewriteRule ^(.*)$ https://website.com/$1 [L,R=301]

    If that didn’t help, you can also get in touch with your web host as they are in a better position redirecting your website from http to https. If you have an SSL, your web host should be able to help you do that.

    I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Matsu
    Rank Math free

    Thank you for your reply.
    The issue is the website URL is now 301
    301 for Https
    301 for Http

    The default settings option on the redirection settings is 301.
    Didn’t notice that.

    Your plugin turn my URL to 301

    Hello,

    Thank you for the update, and sorry for the delay.

    The 301 status is for redirecting your website to your final content. If you wanted your website to be on status 200 for all the versions (http/https & with and without www), you may need to remove the redirects you have added in your .htacces file.

    Please let us know if this issue is already resolved or still need further assistance.

    I hope that helps. Thank you, and looking forward to your update.

    Matsu
    Rank Math free

    Please advise how to fix this, the URL moved to 301 permanently.

    Hello,

    Thanks for getting back. Sorry for the delay and any inconvenience that might have been caused due to that.

    I checked the URL of your site and it’s working fine. Only one version of your URL (non-www and HTTPS) should get 200 status and all other versions should 301 redirect to that version.

    If you don’t want your HTTP and www version to redirect then delete the following code from your .htaccess file.

    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    RewriteCond %{HTTP_HOST} ^www.website.com [NC]
    RewriteRule ^(.*)$ https://website.com/$1 [L,R=301]

    Hope this helps. Let us know if you need any further assistance.

    Matsu
    Rank Math free

    Thank you for your reply, I have a redirect chain that I want to remove.
    https://www.choicerecovery.com/
    301

    The plugin was set to auto-redirect, and it converts the URL to 301.

    I removed the following code from .htaccess

    The guy before you asked me to add it and now you asking me to remove it.

    Matsu
    Rank Math free

    301 Moved Permanently
    http://www.choicerecovery.com/

    This is the issue, redirect chain.

    3XX redirect
    301 Moved Permanently
    https://www.choicerecovery.com/
    301 Moved Permanently
    http://www.choicerecovery.com/

    I didn’t have this before I install the plugin.
    I saw by default on the plugin the redirection is set to 301

    Hello,

    Thank you for the update, and apologies for the delay.

    This could be coming from your .htaccess file or you may want to consult your web host regarding this and how to remove the second redirect.

    You can also proceed by using the WordPress default .htaccess file and then add the code I’ve shared above to see if this fixes the issue.

    If it does not work, then make a point of consulting your web host team to fix the issue for you as there may be a redirect chain set up on your server end.

    I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘Redirections settings sent my Http to https with 301, how I fix it.’ is closed to new replies.