0 votes
in Website Optimization by
Is there any effect of blocking access to css and JavaScript Files?

1 Answer

0 votes
by (47.5k points)

Blocking CSS and JS with a Disallow directive in robots.txt file is not recommended because Google will not be able to render your pages properly.

Google of these days is close to being human in understanding page structure. Therefore, assume that you have blocked JS and CSS from a human view, how will the page look like? Broken, right?

In extreme cases, you will receive an error message in Search Console that your pages cannot be properly rendered because you have blocked resources.

Here is a video of Matt Cutts from Google Search Central explaining why you should not block Googlebot from Crawling your JavaScript and CSS.

Related questions

Register, ask, and answer questions to earn more points and privileges. Some features are disabled for users with few points.
Welcome to Kenyayote Q&A, the largest community site in Kenya where you can ask any question and receive answers from Kenyayote staff and other members of the community.

Before you ask, search the website to make sure your question has not been answered.

If you are ready to ask, provide a title about your question and a detailed description of your problem.

Register to join Kenyayote Ask Community.
...