• Resolved metalhead

    (@aaronthomas1979)


    I’ve got a mysterious link showing up in Google’s search results, for a keyword I’ve targeted.

    The link to my article shows up, which is great, but I need help figuring out what’s causing this other link to show up, and how to stop it.

    Here’s a screenshot of the search results for “spamless chat” in google:

    Unwanted search result screenshot

    If you can’t see that image for some reason, here’s what’s going on:

    This link, the proper link to my article, shows up:
    https://www.adultchatclub.com/spamless-chat/

    But on top of that, this link, which is useless, is showing up also:
    https://www.adultchatclub.com/spamless-chat/spamless-chat-9/

    Notice the -9? That’s the weird part. I think I can use Google options to hide this link, but I’d rather do it properly by correcting it on my site.

    Thanks for any advice on this issue!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    The ‘-9’ URL links to the attachment page of the image you posted. If you have an SEO plugin installed you should look for the option to disable post attachment pages to remove them from being indexed.

    If you don’t have a suitable plugin, then you’ll have to get stuck in with a bit of coding as a temporary workaround. Create a new file in your WordPress theme folder and name it image.php. If your theme already has an image.php file, then you need to edit that instead. All you have to do is add this code as the first line in your image.php file :

    <?php wp_redirect(get_permalink($post->post_parent)); ?>

    Save image.php file and upload it into your theme directory. Now when a users hit the attachment page from Google they will be redirected to the parent post.

    ~ Steven

    Thread Starter metalhead

    (@aaronthomas1979)

    Thanks very much!

    In this case, I was using the Yoast SEO plugin, and I found the option you mentioned. Making that change seems to have instantly corrected the issue. Thanks again!

    You’re most welcome!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unwanted search result’ is closed to new replies.