{"id":9744,"date":"2018-05-28T11:51:10","date_gmt":"2018-05-28T11:51:10","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=9744"},"modified":"2026-03-09T19:20:01","modified_gmt":"2026-03-09T19:20:01","slug":"wordpress-robots-txt","status":"publish","type":"post","link":"\/ng\/tutorials\/wordpress-robots-txt","title":{"rendered":"The complete guide to WordPress robots.TXT"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>To ensure that your site ranks highly in Search Engine Result Pages (SERPs), you&rsquo;ll need to make it easy for search engine &lsquo;bots&rsquo; to explore its most important pages. Having a well-structured&nbsp;<strong>robots.txt&nbsp;<\/strong>file in place will help direct those bots to the pages you want them to index (and avoid the rest).<\/p><p>In this article, we&rsquo;re going to cover:<\/p><ol class=\"wp-block-list\">\n<li>What a&nbsp;<strong>robots.txt&nbsp;<\/strong>file is, and why it&rsquo;s important<\/li>\n\n\n\n<li>Where the WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>file is located.<\/li>\n\n\n\n<li>How to create a&nbsp;<strong>robots.txt&nbsp;<\/strong>file.<\/li>\n\n\n\n<li>What rules to include in your WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>file.<\/li>\n\n\n\n<li>How to test the&nbsp;<strong>robots.txt&nbsp;<\/strong>file, and submit it to Google Search Console.<\/li>\n<\/ol><p>By the end of our discussion, you&rsquo;ll have everything you need to configure a perfect&nbsp;<strong>robots.txt&nbsp;<\/strong>file for your WordPress website. Let&rsquo;s dive in!<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\">Download all-in-one WordPress cheat sheet<\/a><\/p><p>\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-a-wordpress-robots-txt-file-is-and-why-you-need-one\">What a WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>File Is (And Why You Need One)<\/h2><div class=\"wp-block-image size-full wp-image-9750\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"202\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-example.jpg\/public\" alt=\"An example of a robots.txt for WordPress.\" class=\"wp-image-9750\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-example.jpg\/w=924,fit=scale-down 924w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-example.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-example.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-example.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption class=\"wp-element-caption\">WordPress&rsquo; default <strong>robots.txt<\/strong> file is pretty basic, but you can easily replace it.<\/figcaption><\/figure><\/div><p>When you create a new website, search engines will send <a href=\"https:\/\/www.keycdn.com\/blog\/web-crawlers\/\" target=\"_blank\" rel=\"noopener nofollow\">their minions (or bots)<\/a> to &lsquo;crawl&rsquo; through it and make a map of all the pages it contains. That way, they&rsquo;ll know what pages to display as results when someone searches for related keywords. At a basic level, this is simple enough.<\/p><p>The problem is that modern websites contain <em>a lot<\/em> more elements than just pages. <a href=\"\/ng\/tutorials\/what-is-wordpress\">WordPress enables<\/a> you to install plugins, for example, which often come with their own directories. You don&rsquo;t want these to show up in your search engine results, however, since they&rsquo;re not relevant content.<\/p><p>What the&nbsp;<a href=\"https:\/\/support.google.com\/webmasters\/answer\/6062608?hl=en\" target=\"_blank\" rel=\"noopener\"><strong>robots.txt&nbsp;<\/strong>file<\/a> does is provide a set of instructions for search engine bots. It tells them: &ldquo;Hey, you can look here, but don&rsquo;t go into those rooms over there!&rdquo; This file can be as detailed as you want, and it&rsquo;s rather easy to create, even if you&rsquo;re not a technical wizard.<\/p><p>In practice, search engines will still crawl your website even if you don&rsquo;t have a&nbsp;<strong>robots.txt&nbsp;<\/strong>file set up. However, not creating one is inefficient. Without this file, you&rsquo;re leaving it up to the bots to index all your content, and they&rsquo;re so thorough that they might end up showing parts of your website you don&rsquo;t want other people to have access to.<\/p><p>More importantly, without a&nbsp;<strong>robots.txt&nbsp;<\/strong>file, you&rsquo;ll have a lot of bots crawling all over your website. This can negatively impact its performance. Even if the hit is negligible, page speed is something that should always be at the top of your priorities list. After all, there are few things people hate as much as slow websites.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/ng\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"600\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/public\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1536,fit=scale-down 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-where-the-wordpress-robots-txt-file-is-located\">Where the WordPress robots.txt File Is Located<\/h2><p>When you create a WordPress website, it automatically sets up a virtual&nbsp;<strong>robots.txt&nbsp;<\/strong>file located in your server&rsquo;s main folder. For example, if your site is located at&nbsp;<em>yourfakewebsite.com<\/em>, you should be able to visit the address&nbsp;<em>yourfakewebsite.com\/robots.txt,<\/em><em>&nbsp;<\/em>and see a file like this come up:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">User-agent: *\nDisallow: \/wp-admin\/\nDisallow: \/wp-includes\/<\/pre><p>This is an example of a very basic&nbsp;<strong>robots.txt&nbsp;<\/strong>file. To put it in human terms, the part right after&nbsp;<strong>User-agent:&nbsp;<\/strong>declares which bots the rules below apply to. An asterisk means the rules are universal and apply to all bots. In this case, the file tells those bots that they can&rsquo;t go into your&nbsp;<strong>wp-admin&nbsp;<\/strong>and&nbsp;<strong>wp-includes&nbsp;<\/strong>directories. That makes a certain amount of sense since those two folders contain a lot of sensitive files.<\/p><p>However, you may want to add more rules to your own file. Before you can do that, you&rsquo;ll need to understand that this is a <em>virtual<\/em> file. Usually, the WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>location is within your&nbsp;<strong>root&nbsp;<\/strong>directory, which is often called&nbsp;<strong>public_html&nbsp;<\/strong>or&nbsp;<strong>www<\/strong> (or is named after your website):<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"304\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/www-folder.jpg\/public\" alt=\"WordPress root folder\" class=\"wp-image-9751\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/www-folder.jpg\/w=1019,fit=scale-down 1019w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/www-folder.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/www-folder.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/www-folder.jpg\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/www-folder.jpg\/w=990,fit=scale-down 990w\" sizes=\"auto, (max-width: 1019px) 100vw, 1019px\" \/><\/figure><\/div><p>However, the&nbsp;<strong>robots.txt&nbsp;<\/strong>file WordPress sets up for you by default isn&rsquo;t accessible at all, from any directory. It works, but if you want to make changes to it, you&rsquo;ll need to create your own<strong>&nbsp;<\/strong>file and upload it to your&nbsp;<strong>root&nbsp;<\/strong>folder as a replacement.<\/p><p>We&rsquo;ll cover several ways to create a new&nbsp;<strong>robots.txt&nbsp;<\/strong>for WordPress in a minute. For now, though, let&rsquo;s talk about how to determine what rules yours should include.<\/p><h2 class=\"wp-block-heading\" id=\"h-what-rules-to-include-in-your-wordpress-robots-txt-file\">What Rules to Include in Your WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>File<\/h2><p>In the last section, you saw an example of a WordPress-generated&nbsp;<strong>robots.txt&nbsp;<\/strong>file. It only included two short rules, but most websites set up more than that. Let&rsquo;s take a look at two different&nbsp;<strong>robots.txt&nbsp;<\/strong>files, and talk about what they each do differently.<\/p><p>Here is our first WordPress <strong>robots.txt<\/strong> example:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">User-agent: *\nAllow: \/\n# Disallowed Sub-Directories\nDisallow: \/checkout\/\nDisallow: \/images\/\nDisallow: \/forum\/<\/pre><p>This is a generic&nbsp;<strong>robots.txt&nbsp;<\/strong>file for a website with a forum. Search engines will often index each thread within a forum. Depending on what your forum is for, however, you might want to disallow it. That way, Google won&rsquo;t index hundreds of threads about users making small talk. You could also set up rules indicating specific sub-forums to avoid, and let search engines crawl the rest of them.<\/p><p>You&rsquo;ll also notice a line that reads&nbsp;<strong>Allow: \/&nbsp;<\/strong>at the top of the file. That line tells bots that they can crawl through all of your website&nbsp;pages, aside from the exceptions you set below. Likewise, you&rsquo;ll notice that we set these rules to be universal (with an asterisk), just as WordPress&rsquo; virtual&nbsp;<strong>robots.txt&nbsp;<\/strong>file does.<\/p><p>Now let&rsquo;s check out another WordPress <strong>robots.txt<\/strong> example:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">User-agent: *\nDisallow: \/wp-admin\/\nDisallow: \/wp-includes\/\nUser-agent: Bingbot\nDisallow: \/<\/pre><p>In this file, we set up the same rules WordPress does by default. However, we also added a new set of rules that block <a href=\"https:\/\/www.bing.com\/webmaster\/help\/which-crawlers-does-bing-use-8c184ec0\" target=\"_blank\" rel=\"noopener nofollow\">Bing&rsquo;s search bot<\/a> from crawling through our website. Bingbot, as you might imagine, is the name of that bot.<\/p><p>You can get pretty specific about which search engine&rsquo;s bots get access to your website, and which ones don&rsquo;t. In practice, of course, Bingbot is pretty benign (even if it&rsquo;s not as cool as Googlebot). However, there <em>are<\/em> some malicious bots out there.<\/p><p>The bad news is that they don&rsquo;t always follow the instructions of your&nbsp;<strong>robots.txt&nbsp;<\/strong>file (they are rebels, after all). It&rsquo;s worth keeping in mind that, while most bots will follow the instructions you provide in this file, you aren&rsquo;t <em>forcing<\/em> them to do so. You&rsquo;re just asking nicely.<\/p><p>If you read up on the subject, you&rsquo;ll find a lot of suggestions for what to allow and what to block on your WordPress website. However, in our experience, fewer rules are often better. Here&rsquo;s an example of what we recommend your first&nbsp;<strong>robots.txt&nbsp;<\/strong>file should look like:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">User-Agent: *\nAllow: \/wp-content\/uploads\/\nDisallow: \/wp-content\/plugins\/<\/pre><p>Traditionally, WordPress likes to block access to the&nbsp;<strong>wp-admin&nbsp;<\/strong>and&nbsp;<strong>wp-includes&nbsp;<\/strong>directories. However, that&rsquo;s no longer <a href=\"https:\/\/yoast.com\/wordpress-robots-txt-example\/\" target=\"_blank\" rel=\"noopener nofollow\">considered a best practice<\/a>. Plus, if you add metadata to your images for <a href=\"\/ng\/tutorials\/what-is-seo\/\">Search Engine Optimization (SEO)<\/a> purposes, it doesn&rsquo;t make sense to disallow bots from crawling that information. Instead, the above two rules cover what most basic sites will require.<\/p><p>What you include in your&nbsp;<strong>robots.txt&nbsp;<\/strong>file will depend on your specific site and needs, however. So feel free to do some more research on your own!<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-create-a-wordpress-robots-txt-file-3-methods\">How to Create a WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>File (3 Methods)<\/h2><p>Once you&rsquo;ve decided what will go in your <strong>robots.txt<\/strong> file, all that&rsquo;s left is to create one. You can edit <strong>robots.txt<\/strong> in WordPress either by using a plugin or&nbsp;manually. In this section, we&rsquo;ll teach you how to use two popular plugins to get the job done and discuss how to create and upload the file on your own. Let&rsquo;s get to it!<\/p><h3 class=\"wp-block-heading\" id=\"h-1-use-yoast-seo\">1. Use&nbsp;Yoast SEO<\/h3><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"325\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/public\" alt=\"The Yoast SEO plugin.\" class=\"wp-image-9782\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/w=990,fit=scale-down 990w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/yoast-seo-plugin.jpg\/w=1320,fit=scale-down 1320w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><p><a href=\"https:\/\/wordpress.org\/plugins\/wordpress-seo\/\" target=\"_blank\" rel=\"noopener nofollow\">Yoast SEO<\/a> hardly needs an introduction. It&rsquo;s the most popular SEO plugin for WordPress, and it enables you to optimize your posts and pages to make better use of your keywords. Aside from that, it also provides you with help when it comes to increasing your content&rsquo;s readability, which means more people will be able to enjoy it.<\/p><p>Personally, we&rsquo;re fans of <a href=\"\/ng\/tutorials\/how-to-optimize-wordpress-yoast-seo\">Yoast SEO<\/a> due to its ease of use. That applies just as much to creating a&nbsp;<strong>robots.txt&nbsp;<\/strong>file. Once you <a href=\"\/ng\/tutorials\/wordpress\/how-to-install-wordpress-plugins\">install and activate the plugin<\/a>, navigate to the&nbsp;<strong>SEO&nbsp;-&rsaquo; Tools&nbsp;<\/strong>tab in your dashboard, and look for the option that says&nbsp;<strong>File editor:<\/strong><\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"478\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/file-editor.jpg\/public\" alt=\"The Yoast SEO file editor.\" class=\"wp-image-9752\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/file-editor.jpg\/w=921,fit=scale-down 921w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/file-editor.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/file-editor.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/file-editor.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/figure><\/div><p>Clicking on that link will send you to a new page, where you can edit your&nbsp;<strong>.htaccess&nbsp;<\/strong>file without leaving your dashboard. There&rsquo;s also a handy button that reads&nbsp;<strong>Create robots.txt file<\/strong>, which does exactly what you&rsquo;d expect:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"435\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/create-robots-txt.jpg\/public\" alt=\"Creating a robots.txt for WordPress.\" class=\"wp-image-9753\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/create-robots-txt.jpg\/w=911,fit=scale-down 911w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/create-robots-txt.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/create-robots-txt.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/create-robots-txt.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure><\/div><p>Once you click on this button, the tab will display a new editor where you can modify your&nbsp;<strong>robots.txt&nbsp;<\/strong>file directly. Keep in mind that Yoast SEO sets its own default rules, which override your existing virtual&nbsp;<strong>robots.txt&nbsp;<\/strong>file.<\/p><p>Whenever you add or remove rules, remember to click on the&nbsp;<strong>Save changes to robots.txt&nbsp;<\/strong>button, so they persist:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"916\" height=\"424\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/save-changes-robots.jpg\/public\" alt=\"Edit robots.txt in WordPress.\" class=\"wp-image-9754\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/save-changes-robots.jpg\/w=916,fit=scale-down 916w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/save-changes-robots.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/save-changes-robots.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/save-changes-robots.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 916px) 100vw, 916px\" \/><\/figure><\/div><p>That&rsquo;s easy enough! Now let&rsquo;s see how another popular plugin does the same thing.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-through-the-all-in-one-seo-pack-plugin\">2. Through the All in One SEO Pack Plugin<\/h3><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"337\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/public\" alt=\"The All in One SEO Pack plugin.\" class=\"wp-image-9781\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/w=990,fit=scale-down 990w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/all-in-one-seo-pack.jpg\/w=1320,fit=scale-down 1320w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><p><a href=\"https:\/\/wordpress.org\/plugins\/all-in-one-seo-pack\/\" target=\"_blank\" rel=\"noopener nofollow\">All in One SEO Pack<\/a> is the other big name when it comes to WordPress SEO. It includes most of the features Yoast SEO does, but some people prefer it because it&rsquo;s a more lightweight plugin. As far as&nbsp;<strong>robots.txt&nbsp;<\/strong>goes, creating the file with this plugin is also just as simple.<\/p><p>Once you have the plugin set up, navigate to the&nbsp;<strong>All in One SEO &gt; Feature Manager&nbsp;<\/strong>page in your dashboard. Inside, you&rsquo;ll find an option called&nbsp;<strong>Robots.txt<\/strong>, with a conspicuous&nbsp;<strong>Activate&nbsp;<\/strong>button right below it. Go ahead and click on that:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/activate-robots.jpg\/public\" alt=\"Activating the plugin's robot.txt feature.\" class=\"wp-image-9755\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/activate-robots.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/activate-robots.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/activate-robots.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/activate-robots.jpg\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/activate-robots.jpg\/w=990,fit=scale-down 990w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><p>Now, a new&nbsp;<strong>Robots.txt&nbsp;<\/strong>tab will show up under your&nbsp;<strong>All in One SEO&nbsp;<\/strong>menu. If you click on it, you&rsquo;ll see options to add new rules to your file, save the changes you make, or delete it altogether:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"332\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/add-new-rules.jpg\/public\" alt=\"Adding new rules to your robots.txt file.\" class=\"wp-image-9756\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/add-new-rules.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/add-new-rules.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/add-new-rules.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/add-new-rules.jpg\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/add-new-rules.jpg\/w=990,fit=scale-down 990w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><p>Do note that you can&rsquo;t make changes to your&nbsp;<strong>robots.txt&nbsp;<\/strong>file directly using this plugin. The file itself is grayed out, unlike with Yoast SEO, which enables you to type in whatever you want:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"304\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/greyed-out-robots.jpg\/public\" alt=\"A greyed out robots.txt for WordPress.\" class=\"wp-image-9757\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/greyed-out-robots.jpg\/w=901,fit=scale-down 901w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/greyed-out-robots.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/greyed-out-robots.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/greyed-out-robots.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/figure><\/div><p>In any case, adding new rules is simple, so don&rsquo;t let that small downside discourage you. More importantly, All in One SEO Pack also includes a feature that can help you block &lsquo;bad&rsquo; bots, which you can access from your&nbsp;<strong>All in One SEO&nbsp;<\/strong>tab:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"482\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/bad-bot-blocker.jpg\/public\" alt=\"Using the plugin's bad bot blocking feature.\" class=\"wp-image-9758\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/bad-bot-blocker.jpg\/w=957,fit=scale-down 957w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/bad-bot-blocker.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/bad-bot-blocker.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/bad-bot-blocker.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><\/figure><\/div><p>That&rsquo;s all you need to do if you choose to use this method. However, let&rsquo;s talk about how to create a&nbsp;<strong>robots.txt&nbsp;<\/strong>file manually, if you don&rsquo;t want to set up an extra plugin just to take care of this task.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-create-and-upload-your-wordpress-robots-txt-file-via-ftp\">3. Create and Upload Your WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>File Via FTP<\/h3><p>Creating a&nbsp;<strong>txt&nbsp;<\/strong>file couldn&rsquo;t be simpler. All you have to do is open up your favorite text editor (such as Notepad or TextEdit), and type in a few lines. Then you can save the file, using any name you want and the&nbsp;<strong>txt&nbsp;<\/strong>file type. It literally takes seconds to do this, so it makes sense that you might want to edit <strong>robots.txt<\/strong> in WordPress&nbsp;without using a plugin.<\/p><p>Here&rsquo;s a quick example of one such file:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"92\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-file-example.jpg\/public\" alt=\"Creating a robots.txt file manually.\" class=\"wp-image-9759\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-file-example.jpg\/w=920,fit=scale-down 920w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-file-example.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-file-example.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/robots-file-example.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure><\/div><p>For the purposes of this tutorial, we saved this file directly to our computer. Once you have your own file created and saved, you&rsquo;ll need to connect to your website <a href=\"https:\/\/wordpress.org\/support\/article\/ftp-clients\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">via FTP<\/a>. If you&rsquo;re not sure how to do that, we have a guide to doing this <a href=\"\/ng\/tutorials\/ftp\/filezilla-ftp-configuration\">using the beginner-friendly FileZilla client<\/a>.<\/p><p>Once you&rsquo;re connected to your site, navigate to the&nbsp;<strong>public_html&nbsp;<\/strong>folder. Then, all you have to do is upload the&nbsp;<strong>robots.txt&nbsp;<\/strong>file from your computer over to your server. You can do that by either right-clicking on the file using your FTP client&rsquo;s local navigator, or by simply dragging and dropping it into place:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"337\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/upload-robots-file.jpg\/public\" alt=\"Uploading the file to your root folder.\" class=\"wp-image-9760\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/upload-robots-file.jpg\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/upload-robots-file.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/upload-robots-file.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/upload-robots-file.jpg\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/upload-robots-file.jpg\/w=990,fit=scale-down 990w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div><p>It should only take a few seconds for the file to upload. As you can see, this method is nearly as simple as using a plugin.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-test-your-wordpress-robots-txt-file-and-submit-it-to-google-search-console\">How to Test Your WordPress robots.txt File and Submit It to Google Search Console<\/h2><p>Once your WordPress robots.txt file is created and uploaded, you can use <a href=\"https:\/\/www.google.com\/webmasters\/tools\/home?hl=en\" target=\"_blank\" rel=\"noopener nofollow\">Google Search Console<\/a> to test it&nbsp;for errors. The Search Console is a collection of tools Google offers to help you monitor how your content appears in its search results. One of these tools is a&nbsp;<strong>robots.txt&nbsp;<\/strong>checker, which you can use by logging into your console and navigating to the&nbsp;<strong>robots.txt Tester&nbsp;<\/strong>tab:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"445\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/search-console-tester.jpg\/public\" alt=\"The Search Console tester feature.\" class=\"wp-image-9761\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/search-console-tester.jpg\/w=929,fit=scale-down 929w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/search-console-tester.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/search-console-tester.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/search-console-tester.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/figure><\/div><p>Inside, you&rsquo;ll find an editor field where you can add your WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>file code, and click on the&nbsp;<strong>Submit&nbsp;<\/strong>button right below. Google Search Console will ask if you want to use that new code, or pull the file from your website. Click on the option that says&nbsp;<strong>Ask Google to Update&nbsp;<\/strong>to submit it manually:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"318\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/submit-code-manually.jpg\/public\" alt=\"Submitting your file to the Search Console\" class=\"wp-image-9762\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/submit-code-manually.jpg\/w=911,fit=scale-down 911w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/submit-code-manually.jpg\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/submit-code-manually.jpg\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2018\/05\/submit-code-manually.jpg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure><\/div><p>Now, the platform will check your file for errors. If there are any, it will point them out for you. However, you&rsquo;ve seen more than one WordPress <strong>robots.txt<\/strong> example&nbsp;by now, so chances are high that yours is perfect!<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>In order to increase your site&rsquo;s exposure, you&rsquo;ll need to ensure that search engine bots are crawling the most relevant information. As we have seen, a well-configured WordPress&nbsp;<strong>robots.txt&nbsp;<\/strong>file will enable you to dictate exactly how those bots interact with your site. That way, they&rsquo;ll be able to present searchers with more relevant and useful content.<\/p><p>Do you have any questions about how to edit <strong>robots.txt<\/strong> in WordPress? Let us know in the comments section below!<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Learn More About WordPress SEO<\/h4>\n                    <p> <a href=\"\/ng\/tutorials\/wordpress-seo-tips\">WordPress SEO Tips<\/a><br>\n<a href=\"\/ng\/tutorials\/how-to-create-wordpress-sitemap\" target=\"&rdquo;_blank&rdquo;\" rel=\"noopener\">How to Create a Sitemap in WordPress<\/a><br>\n<a href=\"\/ng\/tutorials\/wordpress-schema-markup\/\" target=\"&rdquo;_blank&rdquo;\" rel=\"noopener\">How to Add WordPress Schema Markup<\/a><br>\n<a href=\"\/ng\/tutorials\/wordpress-meta-description\" target=\"&rdquo;_blank&rdquo;\" rel=\"noopener\">How to Add Meta Description and Meta Title in WordPress<\/a><br>\n<a href=\"\/ng\/tutorials\/wordpress-amp\/\" target=\"&rdquo;_blank&rdquo;\" rel=\"noopener\">How to Setup AMP (Accelerated Mobile Pages) in WordPress<\/a><br>\n<a href=\"\/ng\/tutorials\/prevent-search-engines-from-indexing-wordpress\" target=\"&rdquo;_blank&rdquo;\" rel=\"noopener\">How to Prevent Search Engines from Indexing Your WordPress Site<\/a><a><br>\n<\/a><a href=\"\/ng\/tutorials\/add-breadcrumbs-wordpress\" target=\"&rdquo;_blank&rdquo;\" rel=\"noopener\">How to Add Breadcrumbs in WordPress<\/a> <\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-wordpress-robots-txt-faq\">WordPress robots.txt FAQ<\/h2><p>Here are some frequently asked questions about WordPress robots.txt.<\/p><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1678184688673\"><h3 class=\"schema-faq-question\">Can I Disable robots.txt in WordPress?<\/h3> <p class=\"schema-faq-answer\">No, you cannot disable robots.txt in WordPress as it is a standard file used to communicate with search engines and instructs them which pages to crawl or not. However, you can modify the content of the file to control how search engines interact with your site.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1678184711033\"><h3 class=\"schema-faq-question\">How Do I Optimize My WordPress Site&rsquo;s robots.txt?<\/h3> <p class=\"schema-faq-answer\">To optimize your WordPress site&rsquo;s robots.txt, you can use plugins like<strong> Yoast SEO<\/strong> to generate a robots.txt file with recommended settings. You can also modify the file manually to control which pages and directories to block or allow search engines to crawl.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>To ensure that your site ranks highly in Search Engine Result Pages (SERPs), you&rsquo;ll need to make it easy for search engine &lsquo;bots&rsquo; to explore its most important pages. Having a well-structured&nbsp;robots.txt&nbsp;file in place will help direct those bots to the pages you want them to index (and avoid the rest). In this article, we&rsquo;re [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/wordpress-robots-txt\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":76,"featured_media":145316,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"The Complete Guide to WordPress robots.txt (And How to Use it for SEO)","rank_math_description":"Learn how to leverage your WordPress robots.txt file to improve your SEO and prevent unnecessary bots from making requests on your website.","rank_math_focus_keyword":"wordpress robots.txt, robots.txt for wordpress, wordpress robots.txt location, wordpress robots.txt example, edit robots.txt in wordpress","footnotes":""},"categories":[22637],"tags":[],"class_list":["post-9744","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/wordpress-robots-txt","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/arquivos-robots-txt-wordpress","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/robots-txt-wordpress","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/guia-completa-robots-txt-wordpress","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-setting-robot-txt-di-wordpress","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/wordpress-robots-txt","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/wordpress-robots-txt","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/wordpress-robots-txt","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/guia-completa-robots-txt-wordpress","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/guia-completa-robots-txt-wordpress","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/guia-completa-robots-txt-wordpress","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/arquivos-robots-txt-wordpress","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/wordpress-robots-txt","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/wordpress-robots-txt","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/wordpress-robots-txt","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/wordpress-robots-txt","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/9744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/76"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=9744"}],"version-history":[{"count":27,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/9744\/revisions"}],"predecessor-version":[{"id":145315,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/9744\/revisions\/145315"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media\/145316"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=9744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=9744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=9744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}