• Resolved jeffrahr

    (@jeffrahr)


    Hi, thanks in advance for any help offered. I’m a novice to wordpress and took over a site that had been blacklisted (said my site may have been hacked – which it had with spam links for loans) by google. I have successfully cleaned it and gotten unblacklisted by google, but in the process I think I broke sitelinks. When using the sitelinks that a google search creates, i get the following error.
    The requested URL /tags/4.5.1/gangplank-lossier.php was not found on this server.

    I have tried changing to a different theme and back and resaved permalink settings but to no avail.

    If you search on Mill Creek Towne Pool Derwood. The search result link to the main page works, but none of the links to child pages work. Navigation from the website itself works fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Google’s Sitelinks are generated automatically and it takes a while for Google to remove them or fix them.

    Your best bet is to create a redirection until you solve the problem, so that Google doesn’t drop the Sitelink.

    Now, your URL has a .php at the end. What’s the reason for that? How do your Permalinks look like?

    Thread Starter jeffrahr

    (@jeffrahr)

    This is what one of the permalinks looks like:
    https://www.mctsa.com/events/

    The file /gangplank-lossier.php is part of the core wordpress install according to sucuri security pluggin.

    Also the fact that i’m running 4.5.2 and the path has 4.5.1 is suspect.

    A google search of the error returns 0 hits.

    I got this – https://gyazo.com/e324be9010aaa424303ddb45e46f73d8 – so I suppose there’s something somewhere that redirects. That file is not part of WordPress core.

    Check your .htaccess file, your wp-config.php file for any suspicious code. You can also try to go to Dashboard -> Updates and reinstall WordPress. Using the Sucuri plugin, you can “reset” your plugins to the original version (only for those in WordPress Repository).

    Thread Starter jeffrahr

    (@jeffrahr)

    Thanks for your help. There was something in the .htaccess file that was redirecting to gangplank-lossier.php. Thanks for pointing me in the right direction. Not sure if this was something malicious or something left over that a previous page admin had tried to do.

    Do you still have that redirect line? Could you copy it here?

    Thread Starter jeffrahr

    (@jeffrahr)

    The contents of .htaccess:
    RewriteEngine On

    RewriteCond %{ENV:REDIRECT_STATUS} 200
    RewriteRule ^ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
    RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
    RewriteRule ^(.*)$ gangplank-lossier.php?$1 [L]

    The contents of gangplank-lossier.php:
    The requested URL /tags/4.5.1/gangplank-lossier.php was not found on this server

    That was definitely something shady.

    The conditions for a visitor to arrive from a search engine are similar to other hacks. If you visit the site directly, you won’t see anything but if you search the site in Google and then click on the link, you’ll get redirected. This mechanism buys some time for the hacker, as you, as a developer, or the client, won’t notice the redirection immediately.

    Now, you should check your site’s root and install a security plugin, such as Sucuri or WordFence and scan your site.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘google search site links don't work’ is closed to new replies.