locked
404 - File or directory not found RRS feed

  • Question

  • User1850488 posted

    Hi,

    When try open website from google search get 404 - File or directory not found.

    When set cursor on that link and click enter site work fine.

    Any solution? Online example

    In web config is added line for default page:  default.aspx

    When enable:

    <label for="ctl07_ctl00_ctl00_webSitesCustomErrorsControl_chkIisDetailedErrors">Show detailed IIS errors in browser,<label for="ctl07_ctl00_ctl00_webSitesCustomErrorsControl_chkAspNetDetailedErrors">Show detailed ASP.NET errors in browser,<label for="ctl07_ctl00_ctl00_webSitesCustomErrorsControl_chkAspDetailedErrors">Show detailed ASP errors in browser OPEN BLANK PAGE!</label></label></label>

    <label for="ctl07_ctl00_ctl00_webSitesCustomErrorsControl_chkIisDetailedErrors" style="display: inline-block; padding: 3px 5px; cursor: inherit;"> </label>

    <label for="ctl07_ctl00_ctl00_webSitesCustomErrorsControl_chkAspNetDetailedErrors" style="display: inline-block; padding: 3px 5px; cursor: inherit;"> </label>

    Friday, June 24, 2016 6:49 AM

Answers

  • User-158764254 posted

    <add input="{HTTP_REFERER}" pattern="google|yahoo|bing|aol|ask" />

    when you click a link on a search result page, the link brings you to your site and the referrer would be that search engine.

    so I dont think you want to send everybody to a bot page because they were referred to your site by a search engine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 2, 2016 1:13 AM

All replies

  • User-693045842 posted

    Hi,

    Let's confirm the steps :

    1. open website from google search get 404 - File or directory not found.

    2. The same website , refresh/F5 , the website works .

    Right ?

    Monday, June 27, 2016 5:36 AM
  • User1850488 posted

    F5 not working....only working when click on url in browser and press enter.

    Monday, June 27, 2016 7:01 AM
  • User-158764254 posted

    when the referrer value that is sent to your site contains the word "google", your site responds with a 404.

    I'd start by checking your web.config looking for any rewrite rules based on the word google

    Tuesday, June 28, 2016 8:59 AM
  • User1850488 posted

    I'm find this.....

    <rewrite>
      <rules>
        <rule name="1" patternSyntax="ECMAScript" stopProcessing="true">
          <match url="^$" ignoreCase="true" negate="false" />
          <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
            <add input="{HTTP_USER_AGENT}" pattern="Googlebot|Yahoo|MSNBot|bingbot" />
    <add input="{HTTP_REFERER}" pattern="google|yahoo|bing|aol|ask" />
    
          </conditions>
          <action type="Rewrite" url="bot.asp" />
        </rule>
      </rules>
    </rewrite>

    Friday, July 1, 2016 10:35 AM
  • User-158764254 posted

    <add input="{HTTP_REFERER}" pattern="google|yahoo|bing|aol|ask" />

    when you click a link on a search result page, the link brings you to your site and the referrer would be that search engine.

    so I dont think you want to send everybody to a bot page because they were referred to your site by a search engine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 2, 2016 1:13 AM