I am facing issue with my site in google console
I am getting below error in google console for my site
https://api.html5media.info/1.1.5/html5media.min.js Type : Script Status : Googlebot blocked by robots.txt
My site is in xcart and my robots.txt contains
User-agent: Googlebot Disallow: /*printable=Y* Disallow: /*js=* Disallow: /*print_cat=* Disallow: /*mode=add_vote* User-agent: * Allow: *.js Allow: *.css Allow: *.jpg Allow: *.gif Allow: *.png Disallow: /admin/ Disallow: /catalog/ Disallow: /customer/ Disallow: /files/ Disallow: /include/ ....
I tried changing
User-Agent: Googlebot Disallow: /*printable=Y* Disallow: /*print_cat=* Disallow: /*mode=add_vote* Allow: .js
But no luck with above code. Anyone has solution? how can i allow third party js allowed by google bot using my robots.txt
If the .js file is on a third party site that you have no control over, then no, there is no way to un-block it from your site. A given robots.txt file only controls crawling of files on the domain/subdomain that the robots.txt file was loaded from. To unblock this file, you would need to be able to change the robots.txt file on the third-party domain. (I'm assuming you can't do that here)
The simplest way to get around this is to copy the js file to your own server, and link to it there.
- → How do I call the value from another backed page form and use it on a component in OctoberCms
- → Inline JS callback syntax Vs Internal JS callback syntax
- → Prevent form action from being followed by robots
- → How to remove parameters from the root URL if it does I18n
- → SEO Canonical URL in Greek characters
- → Htaccess negation
- → Wrapping anchor elements with text
- → Adding schema.org to site
- → dynamic php title depends on page id and using of "if (isset"
- → Building sitemap for 2 wordpress install under 1 domain
- → Bigcommerce Repeating url
- → 301 Redirection from no-www to www in wordpress
- → Wrapper inside or outside HTML5 semantics main, which is best practice?