2

I'm working with angular and had added the assets folder as element to exclude from the search engine crawlers, into my robots.txt file.

But I now get the following error while testing the site health of my website. 1 issue with blocked internal resource in robots.txt

What should I do? Is it a good practice to remove such assets (I have a tons of images into it), or is it better to leave it like it.

2
  • 1
    Which tool or software is giving you that error? And what is your reason for wanting to add the assets folder to your robots.txt? Commented Feb 1, 2022 at 10:07
  • 1
    I'm using the following [semrush](semrush.com) & run their site audit. No Idea on the reason why the assets was added to this file, I had to take over a project & was wondering if it was any standard, but couldn't find nothing on internet. Commented Feb 1, 2022 at 10:14

2 Answers 2

1

It is usually a good idea to allow the entire assets folder to be crawled.

Images

If you don't allow your images to be crawled, they won't be indexed in image search. Disallow images from crawling only if you don't want them indexed. If you have multiple sizes of the same image you might want Google to index only the largest size because larger images rank better. You could disallow your small images such as thumbnails.

CSS, JS, and fonts

You want Googlebot to be able to crawl anything needed to render your pages. If Googlebot can't render your pages correctly, there is a risk that your site will not get fully indexed, indexed incorrectly, or that Google will think that they layout isn't usable.

1

What type of files are in your assets folder?

If you have images, JS, CSS, etc, it's ok for Googlebot to crawl them. If Googlebot needs JS to render your page, then those files will need to be crawled to render.

You can always block specific folders in your robots.txt if there's something you don't want crawled, but in this case, I would allow crawling.

1
  • assets folder in the Angular framework would normally contains images & fonts Commented Feb 4, 2022 at 6:57

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.