How to NoIndex Directory With Cpanel

How to NoIndex Directory With Cpanel

How to NoIndex Directory With Cpanel

Today, we are taking a deep dive into the world of cPanel, a tool that’s as powerful as it is essential in managing your web hosting account. One of the most crucial aspects of running a website is controlling how search engines crawl and index your site’s content. Ever wondered how to keep certain directories on your website off the radar of these digital spiders? That’s where the magic of the ‘robots.txt’ file comes into play.

Unmasking the ‘robots.txt’ File

Think of the ‘robots.txt’ file as the unsung hero of your website, silently directing traffic from search engines to where it’s most needed. This unassuming text file provides guidelines for web robots (commonly known as web crawlers or spiders) about which areas of the site should be explored and which should be left untouched. It’s like a map you hand to these digital explorers, ensuring they only venture where you want them to.

Embarking on the Hunt: Locating the ‘robots.txt’ File in cPanel

Venturing into cPanel might seem daunting, but fear not! Here’s your step-by-step guide:

  1. Log into your cPanel account.
  2. In the “FILES” section, click on the “File Manager” icon.
  3. Select the “Document Root for” and your desired domain name from the drop-down menu, ensuring “Show Hidden Files (dotfiles)” is checked.
  4. Click “Go” and welcome yourself to the digital treasure chest – your root directory, typically the “public_html” folder.

The Art of Creation: Crafting a ‘robots.txt’ File

If you find your ‘robots.txt’ file missing in action, don’t fret! Here’s how to conjure one:

  1. Click “+File” at the top-left of the File Manager.
  2. Name the file ‘robots.txt’ and click “Create New File.”
  3. Remember, the magic only works if the file is in the right place – the root directory.

Mastering the Craft: Editing the ‘robots.txt’ File

To guard a specific directory from search engine scrutiny, use the following text in your ‘robots.txt’ file:

User-agent: *
Disallow: /your-directory/

Replace “your-directory” with the folder you want to noindex. Add more lines if you have multiple folders to hide from search engines.

Sealing the Deal: Saving Changes and Verifying Your Work

Once your ‘robots.txt’ file is perfected, hit “Save Changes” in the top-right corner. But how do you ensure it’s working? Verify it using Google’s free Robots Testing Tool or any similar tool of your choice.

A Word to the Wise: Considerations When Using ‘robots.txt’

While ‘robots.txt’ is a powerful ally, remember that not all web robots respect its rules. Also, it’s a public file, meaning anyone can see which directories you’re trying to hide. For more robust solutions, consider the ‘noindex’ meta tag or the X-Robots-Tag HTTP header.


There you have it, a comprehensive guide to using cPanel to control search engine indexing. In the digital world, knowledge truly is power. With this newfound mastery over your ‘robots.txt’ file, you are now armed to steer your website’s SEO destiny.


Got questions? We’ve got answers! Stay tuned for our upcoming FAQs post, where we’ll tackle your most pressing queries about cPanel, ‘robots.txt’files, and search engine indexing.

Remember, in the digital world, every detail counts. Controlling how search engines crawl and index your site is a powerful tool in your arsenal. So, make the most of it. The journey might seem complicated, but with the right knowledge and tools, you’ll be an expert in no time.

I'm Brynton, creator, author, entrepreneur and digital strategist working with 6-7 figure creators and companies. I enjoy building sustainable businesses, streamlining workflow, SEO strategy, marketing automation & content creation, + helping others do the same.

All stories

Leave a Reply

error: Content is protected !!