{"id":245,"date":"2015-04-27T14:28:09","date_gmt":"2015-04-27T14:28:09","guid":{"rendered":"http:\/\/betakb.veeble.org\/?p=245"},"modified":"2025-03-28T12:09:38","modified_gmt":"2025-03-28T06:39:38","slug":"robot-txt","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/robot-txt\/","title":{"rendered":"Robot.txt"},"content":{"rendered":"\n<p>There are several reasons and scenarios where we need to control the access of web robots or web crawlers or simple spiders, to our website or a part of our website. Like Google-bot (Google Spider) visiting our website, spam bots too will visit. Spam bots usually visit and collect private information from our website. When a robot crawls our website it uses a considerable amount of the website\u2019s bandwidth too! It is easy to control robots by disallowing the access of the web robots to our website through the usage of a simple \u2018robots.txt\u2019 file.<\/p>\n\n\n\n<p>Creating a robots.txt:<\/p>\n\n\n\n<p>Open a new File in any Text Editor Like Notepad.<\/p>\n\n\n\n<p>The rules in the robots.txt file are entered in a \u2018field\u2019: \u2018value\u2019 pair.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;field&gt;:&lt;value&gt;\n<\/pre>\n\n\n\n<p><b>&lt;field&gt;<\/b><\/p>\n\n\n\n<p>Can have possible two values: allow or disallow for a particular URL.<\/p>\n\n\n\n<p><b>&lt;value&gt;<\/b><\/p>\n\n\n\n<p>A URL or URI that the access or rule is specified.<\/p>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<p>To exclude all the search engine robots from indexing our entire website.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">User-agent: *\nDisallow: \/\n<\/pre>\n\n\n\n<p>To exclude all the bots from a certain directory within our website.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">User-agent: *\nDisallow: \/aboutme\/\n<\/pre>\n\n\n\n<p>Disallow multiple directories.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">User-agent: *\nDisallow: \/aboutme\/\nDisallow: \/stats\/\n<\/pre>\n\n\n\n<p>To control access to specific documents.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">User-agent: *\nDisallow: \/myFolder\/name_me.html\n<\/pre>\n\n\n\n<p>To disallow a specific <a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_crawler\" target=\"_blank\" rel=\"noopener\">search engine bot<\/a> from indexing our website,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">User-agent: Robot_Name\nDisallow: \/\n<\/pre>\n\n\n\n<p>Advantages of Using Robots.txt:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can avoid the wastage of resources.<\/li>\n\n\n\n<li>Can save Bandwidth<\/li>\n\n\n\n<li>Can remove Clutter and complexity from Web Statistics and more smooth analytics<\/li>\n\n\n\n<li>Refusing a specific Robots<\/li>\n<\/ul>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-881f10be wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Supercharge Your Node.js Apps with Veeble&#8217;s Optimized Hosting<\/h3><p class=\"uagb-cta__desc\">Get peak performance with Veeble&#8217;s Node.js hosting. Global data centers, SSD storage, and robust security ensure speed and reliability. Scale easily and deploy faster.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/nodejs-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Get Started Today<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are several reasons and scenarios where we need to control the access of web robots or web crawlers or simple spiders, to our [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":7549,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[15],"tags":[],"class_list":["post-245","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers-stuff"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Robot.txt.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Digin Dominic","author_link":"https:\/\/www.veeble.com\/kb\/author\/digin-dominic\/"},"uagb_comment_info":0,"uagb_excerpt":"There are several reasons and scenarios where we need to control the access of web robots or web crawlers or simple spiders, to our [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":5,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":8382,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/245\/revisions\/8382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/7549"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}