Programming Tutorials

Error: File does not exist: crossdomain.xml in your server error logs

By: Emiley J in xml Tutorials on 2012-03-30  

As a webmaster, it is a good practice to monitor your webserver error logs to tweak or fine tune your server for better performance. The fact that you are reading this article shows that you are one of those responsible webmasters. :)

There are some errors that are not so obvious when you look at them. Such as this crossdomain.xml error.

Solution: To resolve this just follow these steps.

  1. First goto the root folder of your website.
  2. Create a file named crossdomain.xml (In linux run this command 'touch crossdomain.xml"
  3. Add the following content to this file.
    In linux 'vi crossdomain.xml"  and then paste these lines.
  4. <?xml version="1.0" ?>
    <cross-domain-policy>
      <site-control permitted-cross-domain-policies="master-only"/>
      <allow-access-from domain="*"/>
      <allow-http-request-headers-from domain="*" headers="*"/>
    </cross-domain-policy>
  5. Save the file.

 

That's it. You will not see these errors again in your logs.

Reason: If you are wondering what this crossdomain.xml file does and why someone is accessing it, then readon.

A cross-domain policy file is an XML document that grants a web client-such as Adobe Flash Player, Adobe Reader, etc.-permission to handle data across multiple domains. When a client hosts content from a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain would need to host a cross-domain policy file that grants access to the source domain, allowing the client to continue with the transaction. Policy files grant read access to data, permit a client to include custom headers in cross-domain requests, and are also used with sockets to grant permissions for socket-based connections.

 

But you may be asking, I do not use any flash files in my server, then how does this happen. It is because, someone who has installed a Yontoo-based browser plugin is browsing your site. The browser plugin loads the dddWrapper.swf flash object, which in turn wants to fetch content from your domain. But to do this, it needs to access the cross-domain policy on your site, which is what the crossdomain.xml request is for.






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in xml )

Latest Articles (in xml)