The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Robots.txt - blocking JavaScript and CSS, best practice for Magento

    Robots.txt - blocking JavaScript and CSS, best practice for Magento

    Intermediate & Advanced SEO
    3 3 2.0k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LeapOfBelief
      LeapOfBelief last edited by

      Hi Mozzers,

      I'm looking for some feedback regarding best practices for setting up Robots.txt file in Magento.

      I'm concerned we are blocking bots from crawling essential information for page rank.

      My main concern comes with blocking JavaScript and CSS, are you supposed to block JavaScript and CSS or not?

      You can view our robots.txt file here

      Thanks,

      Blake

      1 Reply Last reply Reply Quote 0
      • J-S
        J-S last edited by

        Best practice is not to block access to JS / CSS anymore,  to allow google to properly understand the website and give determine mobile-friendliness.

        1 Reply Last reply Reply Quote 1
        • Andy.Drinkwater
          Andy.Drinkwater last edited by

          As Joost said, you should not block access to files with help in the reading / rendering of the page.

          Looking at your Robots file, I would look at the following two exclusions. Do they block anything else that runs on a live page that Google should be seeing?

          Disallow: /includes/
          Disallow: /scripts/
          
          -Andy
          
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Robots.txt blocked internal resources Wordpress
            Mat_C
            Mat_C
            1
            5
            985

          • Block subdomain directory in robots.txt
            DirkC
            DirkC
            0
            5
            1.1k

          • Block in robots.txt instead of using canonical?
            RobertFisher
            RobertFisher
            0
            9
            1.6k

          • Robots.txt Blocked Most Site URLs Because of Canonical
            0
            1
            117

          • Blocking out specific URLs with robots.txt
            Modi
            Modi
            0
            3
            133

          • Files blocked in robot.txt and seo
            john4math
            john4math
            0
            4
            344

          • What content should I block in wodpress with robots.txt?
            ENSO
            ENSO
            0
            4
            518

          • Robots.txt is blocking Wordpress Pages from Googlebot?
            Desiree-CP
            Desiree-CP
            0
            4
            10.7k

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy