{"id":72570,"date":"2026-11-28T13:18:15","date_gmt":"2026-11-28T07:48:15","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?page_id=72570"},"modified":"2026-11-28T13:18:15","modified_gmt":"2026-11-28T07:48:15","slug":"robots-txt-generator","status":"publish","type":"page","link":"https:\/\/www.quickonlinetips.com\/archives\/tools\/robots-txt-generator\/","title":{"rendered":"Robots.txt Generator: Create a Robots.txt File Free"},"content":{"rendered":"<p>Use this free <strong>robots.txt generator<\/strong> to create the file that tells search engines which parts of your site they may crawl. Pick your options, click a button, and copy or download a ready-to-upload robots.txt file.<\/p>\n<div class=\"qt-tool\" id=\"qt-rb\"><p class=\"qt-label\" style=\"font-size:1.15em;margin:0 0 10px\"><strong>Step 1:<\/strong> Choose your rules<\/p><div class=\"qt-field\"><label for=\"qt-rb-mode\">Which crawlers may visit your site?<\/label><select id=\"qt-rb-mode\"><option value=\"allow\">Allow all crawlers (best for most live sites)<\/option><option value=\"block\">Block all crawlers (for example a test site)<\/option><\/select><\/div><p><label><input type=\"checkbox\" id=\"qt-rb-wp\"> Block the WordPress admin area (keeps admin-ajax.php open)<\/label><\/p><p><label><input type=\"checkbox\" id=\"qt-rb-search\"> Block internal search result pages<\/label><\/p><p><label><input type=\"checkbox\" id=\"qt-rb-ai\"> Block common AI training crawlers<\/label><\/p><div class=\"qt-field\"><label for=\"qt-rb-paths\">Other folders or pages to block (optional, one per line, such as \/private\/)<\/label><textarea id=\"qt-rb-paths\" rows=\"4\" placeholder=\"\/private\/&#10;\/old-page\/\" spellcheck=\"false\" autocapitalize=\"off\" style=\"width:100%;box-sizing:border-box\"><\/textarea><\/div><div class=\"qt-field\"><label for=\"qt-rb-sitemap\">Sitemap link (optional)<\/label><input type=\"text\" id=\"qt-rb-sitemap\" placeholder=\"https:\/\/www.example.com\/sitemap.xml\" spellcheck=\"false\" autocapitalize=\"off\" autocomplete=\"off\" inputmode=\"url\"><\/div><div class=\"qt-field\"><label for=\"qt-rb-delay\">Crawl-delay (optional, Google ignores it)<\/label><select id=\"qt-rb-delay\"><option value=\"\">None<\/option><option value=\"5\">5 seconds<\/option><option value=\"10\">10 seconds<\/option><option value=\"30\">30 seconds<\/option><\/select><\/div><p class=\"qt-label\" style=\"font-size:1.15em;margin:18px 0 10px\"><strong>Step 2:<\/strong> Press Generate robots.txt, then read your file in the green box<\/p><div class=\"qt-row\"><button type=\"button\" class=\"qt-btn qt-btn-big\" id=\"qt-rb-go\">Generate robots.txt<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost qtx-nomark\" id=\"qt-rb-reset\">\u21ba Start over<\/button><\/div><div class=\"qt-status\" id=\"qt-rb-status\" aria-live=\"polite\"><\/div><div id=\"qt-rb-out\"><\/div><p class=\"qt-note\"><strong>Private by design:<\/strong> Your file is made in your browser. Nothing you type is sent to or stored on our server.<\/p><\/div>\n<script>(function () { function qtReady(fn) { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn); } else { fn(); } } function qtCopy(text, statusEl, okMsg) { function done(ok) { if (statusEl) { statusEl.textContent = ok ? (okMsg || 'Copied to clipboard.') : 'Press Ctrl+C (or Cmd+C) to copy.'; } } function fallback() { var ta = document.createElement('textarea'); ta.value = text; ta.setAttribute('readonly', ''); ta.style.position = 'fixed'; ta.style.top = '-1000px'; document.body.appendChild(ta); ta.select(); var ok = false; try { ok = document.execCommand('copy'); } catch (e) { ok = false; } document.body.removeChild(ta); done(ok); } if (navigator.clipboard) { if (window.isSecureContext) { navigator.clipboard.writeText(text).then(function () { done(true); }, fallback); return; } } fallback(); } function el(tag, cls, text) { var n = document.createElement(tag); if (cls) { n.className = cls; } if (text !== undefined) { n.textContent = text; } return n; } qtReady(function () { var mode = document.getElementById('qt-rb-mode'); if (!mode) { return; } function $(id) { return document.getElementById(id); } var status = $('qt-rb-status'), out = $('qt-rb-out'), last = ''; var NL = String.fromCharCode(10); var AI = ['GPTBot', 'CCBot', 'Google-Extended', 'ClaudeBot', 'PerplexityBot']; function fail(msg) { status.textContent = msg; status.classList.add('qt-error'); } function build() { status.classList.remove('qt-error'); status.textContent = ''; out.textContent = ''; last = ''; var sm = $('qt-rb-sitemap').value.trim(); if (sm) { var ok = false; try { var su = new URL(sm); ok = su.protocol === 'http:' ? true : su.protocol === 'https:'; } catch (e) { ok = false; } if (!ok) { fail('The sitemap link must start with http:\/\/ or https:\/\/'); return; } } var lines = ['User-agent: *']; if (mode.value === 'block') { lines.push('Disallow: \/'); } else { var d = []; if ($('qt-rb-wp').checked) { d.push('Disallow: \/wp-admin\/'); d.push('Allow: \/wp-admin\/admin-ajax.php'); } if ($('qt-rb-search').checked) { d.push('Disallow: \/?s='); d.push('Disallow: \/search\/'); } $('qt-rb-paths').value.split(NL).forEach(function (p) { p = p.trim().split(' ').join(''); if (p) { if (p.charAt(0) !== '\/') { p = '\/' + p; } d.push('Disallow: ' + p); } }); if (d.length === 0) { d.push('Disallow:'); } lines = lines.concat(d); } var cd = $('qt-rb-delay').value; if (cd) { lines.push('Crawl-delay: ' + cd); } if (mode.value !== 'block') { if ($('qt-rb-ai').checked) { AI.forEach(function (b) { lines.push(''); lines.push('User-agent: ' + b); lines.push('Disallow: \/'); }); } } if (sm) { lines.push(''); lines.push('Sitemap: ' + sm); } last = lines.join(NL) + NL; var ans = el('div', 'qtx-answer'); ans.appendChild(el('p', 'qtx-answer-h', 'Your answer: your robots.txt file')); var ta = el('textarea', ''); ta.readOnly = true; ta.rows = Math.min(20, lines.length + 1); ta.value = last; ta.style.width = '100%'; ta.style.boxSizing = 'border-box'; ta.style.fontFamily = 'monospace'; ta.setAttribute('aria-label', 'Your robots.txt file'); ans.appendChild(ta); var row = el('div', 'qt-row'); var b1 = el('button', 'qt-btn qt-btn-ghost', 'Copy file'); b1.type = 'button'; var b2 = el('button', 'qt-btn qt-btn-ghost', 'Download robots.txt'); b2.type = 'button'; b1.addEventListener('click', function () { qtCopy(last, status, 'robots.txt copied.'); }); b2.addEventListener('click', function () { var bl = new Blob([last], { type: 'text\/plain' }); var a = document.createElement('a'); a.href = URL.createObjectURL(bl); a.download = 'robots.txt'; document.body.appendChild(a); a.click(); document.body.removeChild(a); setTimeout(function () { URL.revokeObjectURL(a.href); }, 1000); status.textContent = 'Downloaded robots.txt.'; }); row.appendChild(b1); row.appendChild(b2); ans.appendChild(row); ans.appendChild(el('p', 'qt-note', 'Upload this file to the root of your site so it opens at yoursite.com\/robots.txt. Robots rules are a request, not a lock: well-behaved crawlers follow them, but they do not hide pages from people.')); out.appendChild(ans); status.textContent = 'Done. Read your file in the green box.'; } $('qt-rb-go').addEventListener('click', build); $('qt-rb-reset').addEventListener('click', function () { mode.value = 'allow'; $('qt-rb-wp').checked = false; $('qt-rb-search').checked = false; $('qt-rb-ai').checked = false; $('qt-rb-paths').value = ''; $('qt-rb-sitemap').value = ''; $('qt-rb-delay').value = ''; out.textContent = ''; status.textContent = ''; status.classList.remove('qt-error'); last = ''; }); }); })();<\/script>\n<div class=\"qt-next\"><p class=\"qt-next-h\">Try another free tool<\/p><div class=\"qt-next-g\"><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/meta-tag-generator\/\">Meta Tag Generator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/utm-link-builder\/\">UTM Link Builder<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/redirect-checker\/\">Redirect Checker<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/dns-lookup\/\">DNS Lookup<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/whois-lookup\/\">WHOIS Lookup<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/character-counter\/\">Character Counter<\/a><\/div><\/div>\n<p><em>This tool gives general information only and runs in your browser. Check the result before you upload it, because a wrong rule can stop search engines from seeing your pages. QuickOnlineTips is not affiliated with any search engine, AI company or crawler operator named in the file.<\/em><\/p>\n<p><strong>Quick answer:<\/strong> Leave the first choice on &#8220;Allow all crawlers&#8221;, tick the extras you need, add your sitemap link, then click <strong>Generate robots.txt<\/strong>. Upload the file to the root of your site so it opens at <code>yoursite.com\/robots.txt<\/code>.<\/p>\n<h2>How to create a robots.txt file<\/h2>\n<ol>\n<li>Choose whether to allow or block all crawlers. For a live site, allow all.<\/li>\n<li>Tick any extras: block the WordPress admin area, block internal search pages, or block common AI training crawlers.<\/li>\n<li>Add any folders or pages you want crawlers to skip, one per line, and your sitemap link.<\/li>\n<li>Click <strong>Generate robots.txt<\/strong>, then copy the text or download the file.<\/li>\n<li>Upload it to your site&#8217;s root folder and test it by opening the address in your browser.<\/li>\n<\/ol>\n<h2>What the lines mean<\/h2>\n<table class=\"qt-ref\">\n<thead>\n<tr>\n<th>Line<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>User-agent: *<\/td>\n<td>The rules below apply to all crawlers.<\/td>\n<\/tr>\n<tr>\n<td>Disallow: \/folder\/<\/td>\n<td>Crawlers should not visit this folder.<\/td>\n<\/tr>\n<tr>\n<td>Allow: \/folder\/file<\/td>\n<td>An exception inside a blocked folder.<\/td>\n<\/tr>\n<tr>\n<td>Sitemap: link<\/td>\n<td>Tells crawlers where your sitemap is.<\/td>\n<\/tr>\n<tr>\n<td>Crawl-delay: 10<\/td>\n<td>Asks some crawlers to wait between visits. Google ignores it.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Good to know<\/h2>\n<ul>\n<li><strong>Robots.txt is a request, not security.<\/strong> Do not use it to hide private pages. Use a password instead.<\/li>\n<li><strong>Blocking a page does not remove it from search.<\/strong> A blocked page can still be listed if other sites link to it.<\/li>\n<li><strong>Be careful with Disallow: \/.<\/strong> It blocks your whole site.<\/li>\n<li>Learn how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/04\/add-sitemaps-autodiscovery-in-robotstxt-file\/\">add your sitemap to robots.txt<\/a>, how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2013\/04\/bad-robots-txt-blocked-urls\/\">find and fix URLs blocked by robots.txt<\/a>, and how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2026\/11\/block-ai-crawlers\/\">block AI crawlers from your website<\/a>.<\/li>\n<\/ul>\n<h2>FAQ<\/h2>\n<h3>Is this robots.txt generator free?<\/h3>\n<p>Yes. It is free, needs no sign-up, and runs in your browser. Nothing you type is sent to our server.<\/p>\n<h3>Where do I put the robots.txt file?<\/h3>\n<p>In the top-level folder of your site, so that it opens at yoursite.com\/robots.txt. Subfolders do not work.<\/p>\n<h3>Do I need a robots.txt file?<\/h3>\n<p>Not strictly. Without one, crawlers visit everything they find. A file helps you point to your sitemap and keep crawlers out of areas with no search value.<\/p>\n<h3>Will blocking AI crawlers stop my content being used?<\/h3>\n<p>It asks well-behaved crawlers to stay away. It cannot stop crawlers that ignore the rules.<\/p>\n<h3>Does WordPress already make a robots.txt file?<\/h3>\n<p>WordPress creates a basic virtual one if no file exists, and SEO plugins can edit it. A real file you upload takes the place of the virtual one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use this free robots.txt generator to create the file that tells search engines which parts of your site they may crawl. Pick your options, click a button, and copy or download a ready-to-upload robots.txt file. This tool gives general information only and runs in your browser. Check the result before you upload it, because a&#8230;<\/p>\n","protected":false},"author":7,"featured_media":72580,"parent":65595,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-72570","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/72570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=72570"}],"version-history":[{"count":1,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/72570\/revisions"}],"predecessor-version":[{"id":72584,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/72570\/revisions\/72584"}],"up":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/65595"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/72580"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=72570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}