Google Search Console notified us of several 'Server Error 5(xx)'
These are URL redirects to an adult website. eg: https://example.com/?URL=https://xxxvideo4.com/result/PORNOGRAPHYTERMS an example of this type of attack is shown here:
https://cwe.mitre.org/data/definitions/601.html
I do not see these URLS listed in our sitemap, and I am unsure how GSC would have indexed them to begin with. It is possible that someone accessed our server, as we found a 3 year old piece of malware, however the sitemap looks fine. There might have been access to our .htaccess file, but I am unsure.
I am hoping someone can assist me in "next steps".
- How can I search for the code that allows this type of redirect? It looks like it can be in javascript or php - unsure how I would search for that
- How would I write the .htaccess rule to rewrite all /?URL to either block this, or rewrite to the homepage
- Will the above step address the GSC errors?
- Should I request the removal of these URLs from GSC?
Thanks in advance
Edit: Here are the redirect messages I see when I try to access the links from GSC
Here is the redirect message I see when I add a non crawled URL using the redirect ?URL=