Possible robots are hitting my site at /autodiscover/autodiscover.xml. This gets a 404 which logs as a Page Event in analytics. My site is getting slammed with these. Robot detection is obviously failing here. Can I block certain URLs from getting logged as a page event?

Difficulty level: max

I need to do this on 7.2 and 8.0 and 8.1.

  • Sounds like a weakness probe. It would be better to try to block these requests using a firewall rule. It could also be that Outlook is misconfigured on some computers and trying to get information from your web site instead of your Exchange server.
    – maz
    Commented Oct 30, 2018 at 19:49
  • This is not an answer to your question, hence why a comment. I had the same issue a few years ago. Your site is likely running on the domain name that is used for your company emails. eg. "[email protected]" and your site is "www.example.com". Exchange will hit up the example.com all the time trying to discover details about the users. It's really annoying... you need to configure this on the back-end so that they are sent to the correct autodiscovery domain for your users. @Mark Cassidy's answer has lots of options for ya, but start with Exchange/Office365 Commented Oct 31, 2018 at 11:50

3 Answers 3


Well the real fix would be to re-configure how AutoDiscover is set up on your Exchange Server/Outlook clients. For information on that, go to Exchange & The Autodiscover Web Service.

However your question asks specifically how to ignore certain URLs from being logged. I don't know of a way to do that, but I can suggest a way to have this request ignored.

First, make sure Attribute Routing is enabled.


And then add the following controller to your solution.

public class AutoDiscoverController : Controller
    public ActionResult Index()
        return new HttpStatusCodeResult(HttpStatusCode.RequestTimeout);

There is also a config level approach where you mark the above request to a static handler in IIS. As such, the request never makes it to your application.

<add name="AutoDiscoverXmlFileHandler" path="autodiscover.xml" verb="GET" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />

Source: Using a route to return 408 on a specific file name request

  • This is one of the more annoying pieces of Exchange... Commented Oct 31, 2018 at 11:51
  • I agree with your first point, but its a client's Exchange Server that I have no control over. So, reviewing some options here. Thanks. Commented Nov 2, 2018 at 14:50
  • Is this approach beneficial compared to just putting a 301 redirect using IIS rewrite rules? pros/cons
    – Abhay Dhar
    Commented May 31, 2021 at 16:40
  • Well the real bug would be, that Sitecore Robots Detection doesn't catch this to begin with. However you want to solve it outside of a Sitecore Context is up to you - but it would climb out of scope of this site :-)
    – Mark Cassidy
    Commented May 31, 2021 at 16:55

Just to give some more options, you can add page urls to the untrackedPages section of the config. These are located in the App_Config\Include\Sitecore.Analytics.Tracking.config file.

      <add path="/sitecore/default.aspx" />
      <add path="/sitecore/service/error.aspx" />
      <add path="/sitecore/service/Heartbeat.aspx" />
      <add path="/sitecore/service/keepalive.aspx" />
      <add path="/sitecore/service/nolicense.aspx" />

From a Sitecore ticket I had a little while back:

These pages are processed later in the >Sitecore.Analytics.Pipelines.StartAnalytics.CheckPreconditions processor:

protected bool IsUntrackedPage(string filePath)
  Assert.ArgumentNotNull(filePath, "filePath");
  foreach (string untrackedPage in AnalyticsSettings.UntrackedPages)
    if (filePath.Equals(untrackedPage, StringComparison.InvariantCultureIgnoreCase))
      return true;
  return false;
  • Unfortunately, this is 8.2 and up. Commented Nov 2, 2018 at 15:17

If you are using a route than you need to ensure that route is registered after the Sitecore.Mvc.Pipelines.Loader.InitializeRoutesprocessor so the controller requests are not tracked. There is some more info in the Sitecore documentation here as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.