Mobile app version of vmapp.org
Login or Join
Megan663

: Google finding non existant URLs on my site and 301 redirects failing I have been checking webmaster tools and found that Google has picked up some soft 404s. The weird thing is there are

@Megan663

Posted in: #301Redirect #GoogleSearchConsole #Htaccess #Redirects #Soft404

I have been checking webmaster tools and found that Google has picked up some soft 404s.

The weird thing is there are no such pages on my site and I dont know how Google has come up with these URLs.

There are over a dozen in total and here is a few examples:
mywebsite.com/products/manufacturers.php?&l=a www.mywebsite.com/products/manufacturers.php?&l=b mywebsite.com/products/manufacturers.php?&l=c

They basically just have a different variable at the end.

So I have tried doing a 301 redirect to our home page like so:

RedirectMatch 301 ^/products/manufacturers.php?&l=(.*)$ /


But it doesn't work it just send me to the custom error page because obviously the page its looking for doesn't exist.

I also tried a rewriteRule instead of a 301 redirect but that didn't work either.

Does anybody have any idea how I can make the redirect work so I can remove these from webmaster tools?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

1 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay111

It seems that there is some mistakes in your regex.
Have you tried like bellow :

RedirectMatch 301 ^products/manufacturers.php?&l=(.*)$ /


EDIT: Is products/manufacturers.php a real page of your site ?
Otherwise you could use

RewriteEngine on
RewriteRule ^products/manufacturers.php(.*)$ / [L,R=301]


Tell me if it works

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme