On my .htaccess file, I have simple redirections like this one: redirect 301 /oldpage.php https://www.mywebsite.com/new.page.php Then I've got got the big rewrite script force the "https" and the "www": RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Code (markup): My concern is that it makes 2 redirections. Even with the 301 one written above, my website makes the rewriting redirection first, and then the 301 one. 2 reirections are bad for SEO. Any suggestion on how to force the 301 to be made first? Thanks.
Yes, it's fine and it works. My problem lies with the google search console. I have many pages which google refuses because they're redirected twice. So I'm looking for a way to make the 301 redirection work before the rewriting script, so that there will be only one redirection.