Support » Fixing WordPress » google search results in 404 for a valid page

  • Hi everyone,

    I’ve recently came across a very strange behaviour that I fail to find the cause for and I hope someone might be able to help me here.

    When making a google search and clicking on a link to an entry in my blog, I’m lead to the “page not found” site.
    Copying the URL out of the location box now, opening a new window and pasting it however sends me to the correct entry.

    I’m struggling to understand what exactly is going wrong here – if anyone has any idea what I could try to get closer to the root of the problem or would know what could be the cause of it, that’d be fantastic.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The url concerned and google search query would help a lot in solving your problem

    Thread Starter lxr

    (@lxr)

    Thanks for your reply miocene22 🙂

    The url concerned would be
    http://bernetblog.ch/2010/03/10/verweildauer-in-sozialen-netzwerken-steigt-massiv/

    In google I did a search for “Verweildauer in Sozialen Netzwerken” and the link to it showed up in the first couple results.

    I hope this helps

    Thread Starter lxr

    (@lxr)

    Oh, that is interesting – it seems to happen when I click on the link here as well.

    Previous to this I’ve created a simple html page with a simple link to this url and it worked –> http://test.sitecare.ch/test.php

    I still look looking for a solution, but if it helps any the cause of the error is with the link itself. If I just put it in my browser, it works with or without the slash, but not any link in a forum or search engine. Definitely odd. It is possible that something in your .htaccess is causing it, if you can post your .htaccess coding it may help track down the cause.

    Thread Starter lxr

    (@lxr)

    ooh thanks Kevin! I hadn’t even realised that was a difference!

    We’ve got the following htaccess on the server

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Interesting, while other plugins can modify the .htaccess file, this is the default .htaccess:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    The only difference is that yours has the top index.php rewrite which the default does not. I don’t know if that is what is causing it, but you may want to try commenting out that line (just put a # before it) to see if the first index RewriteRule is causing the issue. You can also try removing the .htaccess altogether, again by renaming it and not deleting it so can you easily re-apply it if the problem still persists.

    Kevin

    Thread Starter lxr

    (@lxr)

    Thanks for the suggestion Kevin!

    I’ve tried modifying the htaccess that way as well as removing it entirely but unfortunately it doesn’t seem to help.

    I’ve noticed that if I click on the google result and do a reload on the page I’ll still end up at the 404 site. If however I simply click into my browser’s location bar and hit enter, it will find the page I’m looking for.

    Were you able to figure out the issue, lxr? I am experiencing the same problem on a site I’m working on.

    I too have tried renaming and modifying the htaccess file but with no luck.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘google search results in 404 for a valid page’ is closed to new replies.