Hacked site 404

Discuss Search Engine Optimization in relation to Joomla! 4.x. This forum will also have discussions on SEF/SEO Joomla! 4.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
komir
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 182
Joined: Sat Jul 03, 2010 1:52 pm

Hacked site 404

Post by komir » Wed Dec 06, 2023 9:54 am

Hi everyone, I need some help with a problem I have. My site was hacked recently and I managed to fix it, but now I have a lot of 404 indexed links from Google that are hurting my SEO.

The links look like this:
https://mydomain.com/buy.php?g2480046.shtml
https://mydomain.com/buy.php?g3313542.shtml
https://mydomain.com/buy.php?g1242451.shtml
https://mydomain.com/buy.php?g390344.shtml
https://mydomain.com/buy.php?g1280509.shtml

They all have the "buy.php" part in common. Is there any way to add a redirection rule, so that all the links containing "buy.php" get redirected to my home page or some other URL?

I would really appreciate any advice or suggestions. Thank you for your time and attention.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43862
Joined: Sat Apr 05, 2008 9:58 pm

Re: Hacked site 404

Post by Webdongle » Wed Dec 06, 2023 11:29 am

1. Why would that hurt your serps?
2. What ranking would you be expecting to get?

try in .htaccess
Redirect 301 /buy*.* /
other combinations
Redirect 301 /buy*.* /anypageonyoursite

Search
htaccess redirect 301 wildcard
google 404 impact
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2514
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Hacked site 404

Post by ceford » Fri Dec 08, 2023 8:26 am

Not really my forte but I think you should return a 204 response code.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 43862
Joined: Sat Apr 05, 2008 9:58 pm

Re: Hacked site 404

Post by Webdongle » Fri Dec 08, 2023 9:45 am

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".


Post Reply

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 4.x”