301 redirection issues

Hello everyone!

I have been experiencing some problems setting up 301 redirections for my website (mayorandino.edu.co). I am using Wordpress to build my site and I have installed the ReallySimpleSSL plugin, but when i try to activate the “Enable 301 .htaccess redirect” option it says that the plugin failed in the test. At the end i left that option deactivated and just left Wordpress redirection on. I have also tried to configure the redirections through the option available in the cPanel but everytime I alter redirects from there the page falls in redirection loop.

The problem is that SEO checkers tell me that 301 redirection is not enabled and i don’t know why.

When I paste the URL’s of my site in (Redirect Checker | Check your Statuscode 301 vs 302) everything appears to be fine, except for this direction

YoastSEO tells me that my site is not being indexed by search engines, does this issue has anything to do with that?.

Apart from what I have said before, I also get a message saying that the server responded with the HTTP status code 200 when it was looking for 404 code, is there any way to fix that?

I appreciate if anyone reads this post and guides me towards a solution. I apologize in advance if I missed an obvious solution to this, I’m a newbie.

Could you try to manually edit your .htaccess file and put the required code or the code that was given to you by Really Simple SSL?

I’m pretty sure that it has.

200 indicates that the request has succeeded. This is not a problem at all.

Thank you for replying.

Yes, with the error message they provide the required code. I manually added it to the .htaccess file but unfortunately it did not work, the error message is still coming up. I even disabled the “Stop editing .htaccess file” option and no result from that either.

I’m sorry if i explained myself badly, i was referring to this:

This mean that you should have your own custom error page like if a visitor navigate to a page that does not exist on your website, then the visitor will redirect into an custom error 404 page instead of InfinityFree error 404 page. Lots of themes can help you to solve that issue.

Your problem is with both www and non-www right? I have also checked your site with woorank. Please follow this tutorial and by editing your htaccess.


To make the 301 redirect from www to non-www you have to add the following code into your .htaccess file:

RewriteEngine On RewriteCond %{HTTP_HOST} www.yourwebsitehere.com RewriteRule (.*) http://yourwebsitehere.com/$1 [R=301,L]

Or if you want to make 301 redirect from non-www to www domain add this following code:

RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Yes, I think the issue is with the www and non-www.

Using this code takes me to redirect loop.

Using this code the redirect between www and non www does not work and the page loads but doesn’t force HTTPS.

If I include this to the code:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

forces HTTPS but the redirect between www and non www still doesn’t work.

A little update on this:

Now the redirection between www and non-www is working, I used the following code:

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

But I still get the message from woorank that not all versions of my page point to the same URL.

When I access the website through:
www.mayorandino.edu.co it redirects to Colegio Mayor Andino | Funza | Excelencia educativa

And when I access through:
mayorandino.edu.co it redirects to https://mayorandino.edu.co

So the problem appears to be the ?!=2 (or the lack of it), is there any way to solve this?

Please read this:

Cause you have force or redirect www to non-www with your code, right? That is why.

Also the ?i=1 or ?i=2 are just a temporary, it will be gone on the next page or you know next visit on your website.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.