1

Its a long time Google Search Console show me a 403 Error for below link.

Content/img/static/skins/

I searched this URL in linked from page Html source and even in inspect element browser (maybe something added with JavaScript) and there was not any link to this directory except it is used in a JavaScript plugin.

  $("#layerslider").layerSlider({
        responsive: true,
        responsiveUnder: 768,
        layersContainer: 768,
        skin: 'v5',
        hoverPrevNext: false,
        showBarTimer: false,
        showCircleTimer: false,
        navButtons: true,
        skinsPath: '/Content/img/static/skins/'
    });

i tried to disallow this URL in robots.txt file but it does not solve the problem. can someone tell me how to fix it?

  • 1
    So, GSC has reported this error in the past? Presumably, you should fix your "JavaScript plugin"? Rather than just "hide" the error in GSC? If that URL cannot be retrieved then it would seem your "JS plugin" is not working as intended? Why is that URL returning a 403? – MrWhite Mar 25 '18 at 16:10
  • @MrWhite Great minds think alike! I was going to suggest fixing why the OP is getting the 403 and not working around not seeing it. It is like your breaks in your car are squealing so you grease them to remove the squeal rater than fix them. – closetnoc Mar 25 '18 at 16:55
  • I would suggest looking in your webserver log files to see why you are getting the 403 error and addressing the issue. We can help with that here. – closetnoc Mar 25 '18 at 18:00
  • Do a CURL command on example.com/wp-content/plugins/layersliderwp/Content/img/static/skins/ if you do not get a 403, its been previously fixed. Also find it strange that they would use a capital letter on Content and most likely a old version that came with a purchased theme, either way you should update it by purchasing it, its only $15 codecanyon.net/item/layerslider-responsive-jquery-slider-plugin/… – Simon Hayter Mar 25 '18 at 19:22
  • 1
    The JavaScript is least of your worries, it's a PHP plugin for WordPress that has had many updates that fix a load of problems, if you don't have those updates then you should expect these type of problems. For the sake of a few dollars you should see if updating to the full licensed version fixes your problem, furthermore you should be aware that if its not version 6.2.1 it has a serious XSS & SQL Injection Vulnerability, and therefore your site is not secure, if the version is very old then version prior 5.2 have CWE-352 & CWE-287 known vulnerabilities. – Simon Hayter Mar 26 '18 at 14:14
2

Google may crawl URLs that it discovers in your javascript, which it seems to have done here.

The most likely reason for the directory returning a 403 forbidden error is that you have indexes disabled in htaccess, which is good practice to do.

Blocking that directory in robots.txt is a fine response, though blocking Google from your directories does have some risk associated with it. Google wants to make sure that the content displayed on your site is clean, and by blocking Google from any content, you risk Googlebot wondering if there is something that you are hiding from it.

The way that I would solve this problem would be to actually just put up a semi-blank index.html page in /Content/img/static/skins/index.html. This way, Google can actually access the page that it is trying to crawl. This will remove the 403 forbidden problem and will help ensure that Googlebot doesn't think you're cloaking.

You can add a NOINDEX NOFOLLOW tag to your header on that page so that Google doesn't frequently crawl it or try to rank it.

1

Googlebot has a bad habit of parsing JavaScript and looking for things that look like URLs in it. That string with no spaces and slashes looks like enough like a URL that Googlebot will then crawl it and report errors for it in Search Console.

I'm sure that the JavaScript for your site doesn't actually use that directory directly. It will only ever append other file names to it. Your server is configured to serve the files in that directory just fine, but to deny the directory listing. Your server is appropriately configured and your JavaScript code is doing the right thing.

You never actually link to that URL and Googlebot is just being dumb. You can ignore the error. It won't hurt your site.

Even if Googlebot does use this awful JavaScript heuristic for link discovery, it shouldn't report errors it find in Search Console. Googlebot has to expect that a large percentage of the URLs it finds in this manner will be broken. It is going to encounter "page not found" errors and "access denied" errors out the wazoo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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