Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • MozCon

        Save on Early Bird tickets and join us in London or New York City

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. Home
    2. SEO Tactics
    3. Technical SEO
    4. Multiple robots.txt files on server

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Multiple robots.txt files on server

    Technical SEO
    5
    7
    3720
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • mjukhud
      mjukhud last edited by

      Hi!

      I have previously hired a developer to put up my site and noticed afterwards that he did not know much about SEO. This lead me to starting to learn myself and applying some changes step by step.

      One of the things I am currently doing is inserting sitemap reference in robots.txt file (which was not there before). But just now when I wanted to upload the file via FTP to my server I found multiple ones - in different sizes - and I dont know what to do with them? Can I remove them? I have downloaded and opened them and they seem to be 2 textfiles and 2 dupplicates. Names:

      robots.txt (original dupplicate)
      robots.txt-Original (original)
      robots.txt-NEW (other content)
      robots.txt-Working (other content dupplicate)

      Would really appreciate help and expertise suggestions. Thanks!

      1 Reply Last reply Reply Quote 0
      • peakdistrictseo
        peakdistrictseo last edited by

        So what's the best policy if a site uses an e-commerce platform like Magento, which has a robots file, but also has a Wordpress blog installed to another folder. eg: /blog and uses a plugin like YOAST which generated a robots file of the Wordpress installation.

        Then you have 2 robots files, is this detrimental or no big deal?

        1 Reply Last reply Reply Quote 0
        • mjukhud
          mjukhud @seoman10 last edited by

          Thanks very much for the help!

          1 Reply Last reply Reply Quote 0
          • mjukhud
            mjukhud last edited by

            Thanks very much for the help!

            1 Reply Last reply Reply Quote 0
            • seoman10
              seoman10 last edited by

              Keep a backup and remove them.

              Search engines are only going to look at the file which is exactly called robots.txt variations of file name will be ignored.

              Do make sure the entries are correct in the main one though, you don't want Google crawling admin pages or other confidential areas of the site.

              mjukhud 1 Reply Last reply Reply Quote 1
              • mjukhud
                mjukhud @Mustansar last edited by

                Hi, thanks for the answer and help!

                Well, I only have one domain that has a webpage and no subdomains active (no blog-subdomain or similar) - so how can I configure that to the situation? Can I just remove all and upload the one I want, maybe?

                1 Reply Last reply Reply Quote 0
                • Mustansar
                  Mustansar last edited by

                  That's a good question, EMS.  The robots.txt protocol can get kind of 
                  confusing when you think about it too long, and it sounds like you've 
                  thought about this a bit.  However, in this case, it might help to 
                  look at robots.txt from the perspective of the spider.

                  When a spider finds a URL, it takes the whole domain name (everything 
                  between 'http://' and the next '/'), then sticks a '/robots.txt' on 
                  the end of it and looks for that file.  If that file exists, then the 
                  spider should read it to see where it is allowed to crawl.

                  In your case, Googlebot, or any other spider, should try to access 
                  three URLs: domainA.com/robots.txt, domainB.domainA.com/robots.txt, 
                  and domainB.com/robots.txt.  The rules in each are treated as 
                  separate, so disallowing robots from domainA.com/ should result in 
                  domainA.com/ being removed from search results while 
                  domainB.domainA.com/ remains unaffected, which does not sound like not 
                  something you want.

                  The problem you might have with the setup you have described is this-- 
                  in order to keep domainB.domainA.com out of the results, you would 
                  need to have domainB.domainA.com/robots.txt exclude robots, while 
                  domainB.com/robots.txt welcomes them.  This means that you would need 
                  to have a way to make domainB.domainA.com/ and domainB.com/ serve 
                  different information, and judging from what you've described, you 
                  have not set up your server to do so yet.

                  Of course, it is always possible that I have assumed to much about 
                  your situation, so it is a good idea to use Google's robots.txt 
                  analysis tool (see http://www.google.com/support/webmasters/bin/topic.py?topic=8475
                  ) to see if your robots.txt files already produce the results you 
                  want.

                  If using robots.txt files doesn't solve the problem, and assuming that 
                  you want to continue hosting all of your content on domainA.com, one 
                  strategy you really should look into would be setting up a 301 
                  redirect from the pages on domainB.domainA.com/ to domainB.com/ .  If 
                  you need more advice on how to do this with your server software, your 
                  hosting company's tech support would definitely be the best place to 
                  start, but this group is here to help if more isues arise. 🙂

                  Hope that helps!

                  mjukhud 1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  Got a burning SEO question?

                  Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                  Start my free trial


                  Browse Questions

                  Explore more categories

                  • Moz Tools

                    Chat with the community about the Moz tools.

                  • SEO Tactics

                    Discuss the SEO process with fellow marketers

                  • Community

                    Discuss industry events, jobs, and news!

                  • Digital Marketing

                    Chat about tactics outside of SEO

                  • Research & Trends

                    Dive into research and trends in the search industry.

                  • Support

                    Connect on product support and feature requests.

                  • See all categories

                  Related Questions

                  • Rogerperk

                    Best way to link to multiple location pages

                    I am a Magician and have multiple location pages for each county I cover. I currently have them linked off the menu under locations/ <county>and also in the footer</county> However I have heard that a link from the page is much stronger, so I am experimenting with removing the Menu & Footer link and just linking to these pages from within the content. It's not really a navigation item and most people come in through search to the right page. Am I diluting the link by having it in the Menu/Page and Footer? I read a long time ago that Google only considers the first link to a page and ignores the rest - is that the case? Thanks Roger https://www.rogerlapin.co.uk/

                    Technical SEO | | Rogerperk
                    0
                  • JamesHancocks1

                    Robots.txt Tester - syntax not understood

                    I've looked in the robots.txt Tester and I can see 3 warnings: There is a 'syntax not understood' warning for each of these. XML Sitemaps:
                    https://www.pkeducation.co.uk/post-sitemap.xml
                    https://www.pkeducation.co.uk/sitemap_index.xml How do I fix or reformat these to remove the warnings? Many thanks in advance.
                    Jim

                    Technical SEO | | JamesHancocks1
                    0
                  • Eurasmus.com

                    Log in, sign up, user registration and robots

                    Hi all, We have an accommodation site that asks users only to register when they want to book a room, in the last step. Though this is the ideal situation when you have tons of users, nowadays we are having around 1500 - 2000 per day and making tests we found out that if we ask for a registration (simple, 1 click FB) we mail them all and through a good customer service we are increasing our sales. That is why, we would like to ask users to register right after the home page ie Home/accommodation or and all the rest. I am not sure how can I make to make that content still visible to robots.
                    Will the authentication process block google crawling it? Maybe something we can do? We are  not completely sure how to proceed so any tip would be appreciated. Thank you all for answering.

                    Technical SEO | | Eurasmus.com
                    3
                  • ulefos

                    Remove html file extension and 301 redirects

                    Hi Recently I ask for some work done on my website from a company,  but I am not sure what they've done is right.
                    What I wanted was html file extensions to be removed like
                    /ash-logs.html to /ash-logs
                    also the index.html to www.timports.co.uk
                    I have done a crawl diagnostics and have duplicate page content and 32 page title duplicates. This is so doing my head in please help This is what is in the .htaccess file <ifmodule pagespeed_module="">ModPagespeed on
                    ModPagespeedEnableFilters extend_cache,combine_css, collapse_whitespace,move_css_to_head, remove_comments</ifmodule> <ifmodule mod_headers.c="">Header set Connection keep-alive</ifmodule> <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews</ifmodule> DirectoryIndex index.html RewriteEngine On 
                     # Rewrite valid requests on .html files  RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^ %{REQUEST_URI}.html?rw=1 [L,QSA] 
                     # Return 404 on direct requests against .html files RewriteCond %{REQUEST_URI} .html$  
                    RewriteCond %{QUERY_STRING} !rw=1 [NC]
                     RewriteRule ^ - [R=404] AddCharset UTF-8 .html # <filesmatch “.(js|css|html|htm|php|xml|swf|flv|ashx)$”="">#SetOutputFilter DEFLATE #</filesmatch> <ifmodule mod_expires.c="">ExpiresActive On
                    ExpiresByType image/gif "access plus 1 years"
                    ExpiresByType image/jpeg "access plus 1 years"
                    ExpiresByType image/png "access plus 1 years"
                    ExpiresByType image/x-icon "access plus 1 years"
                    ExpiresByType image/jpg "access plus 1 years"
                    ExpiresByType text/css "access 1 years"
                    ExpiresByType text/x-javascript "access 1 years"
                    ExpiresByType application/javascript "access 1 years"
                    ExpiresByType image/x-icon "access 1 years"</ifmodule> <files 403.shtml="">order allow,deny allow from all</files> redirect 301 /PRODUCTS http://www.timports.co.uk/kiln-dried-logs
                    redirect 301 /kindling_firewood.html http://www.timports.co.uk/kindling-firewood.html
                    redirect 301 /about_us.html http://www.timports.co.uk/about-us.html
                    redirect 301 /log_delivery.html http://www.timports.co.uk/log-delivery.html redirect 301 /oak_boards_delivery.html http://www.timports.co.uk/oak-boards-delivery.html
                    redirect 301 /un_edged_oak_boards.html http://www.timports.co.uk/un-edged-oak-boards.html
                    redirect 301 /wholesale_logs.html http://www.timports.co.uk/wholesale-logs.html redirect 301 /privacy_policy.html http://www.timports.co.uk/privacy-policy.html redirect 301 /payment_failed.html http://www.timports.co.uk/payment-failed.html redirect 301 /payment_info.html http://www.timports.co.uk/payment-info.html

                    Technical SEO | | ulefos
                    1
                  • mistat2000

                    500 Server Error on RSS Feed

                    Hi there, I am getting multiple 500 errors on my RSS feed. Here is the error: <dt>Title</dt> <dd>500 : Error</dd> <dt>Meta Description</dt> <dd>Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/downpour/init.py", line 391, in _error failure.raiseException() File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 370, in raiseException raise self.type, self.value, self.tb Error: 500 Internal Server Error</dd> <dt>Meta Robots</dt> <dd>Not present/empty</dd> <dt>Meta Refresh</dt> <dd>Not present/empty</dd> Any ideas as to why this is happening, they are valid feeds?

                    Technical SEO | | mistat2000
                    0
                  • irvingw

                    Allow or Disallow First in Robots.txt

                    If I want to override a Disallow directive in robots.txt with an Allow command, do I have the Allow command before or after the Disallow command? example: Allow: /models/ford///page* Disallow: /models////page

                    Technical SEO | | irvingw
                    0
                  • nicole.healthline

                    Is blocking RSS Feeds with robots.txt necessary?

                    Is it necessary to block an rss feed with robots.txt? It seems they are automatically not indexed (http://googlewebmastercentral.blogspot.com/2007/12/taking-feeds-out-of-our-web-search.html) And, google says here that it's important not to block RSS feeds (http://googlewebmastercentral.blogspot.com/2009/10/using-rssatom-feeds-to-discover-new.html) I'm just checking!

                    Technical SEO | | nicole.healthline
                    0
                  • Grenadi

                    How to 301 multiple domain names to a single domain

                    Hey, I tried to find and answer to this seemingly simple question, but no luck. So, I have one domain name with a website attached to it. I also registered all the other domain names that are similar to it or have different extensions - I want to redirect all the other domain names to my one main domain name without getting penalised by the big G. It looks like this: www.mainsite.com - this is my main domain I also have www.mainsite.com.au, www.mainsite.org, and www.mainsite.org.au which I all want to just redirect to www.mainsite.com I have been told that the best way to do this is a 301 redirect, but to do that you need to make a CNAME for all the other domains that points to www.mainsite.com. My problem is that I cannot seem to create a CNAME record for http://mainsite.com - I have it working for http://www.mainsite.com but not the non www record. What should I be doing differently? Is it just my DNS provider is useless? Thanks, Anthony

                    Technical SEO | | Grenadi
                    0

                  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
                  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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy

                  Looks like your connection to Moz was lost, please wait while we try to reconnect.