How to Create Robot.txt Tool on your Website with Free Source Code
In this article, we are going to learn the "how to make Robots.txt generator Tool Source to Blogger and WordPress. This process is very easy and simple to create the robot.txt Generator on your Website with this Open Source Code. So, this code helps to literally Make Single Page Robot.txt Tool on blogger. And this is a Tool so you no need to modify it continuously. this is a one-time Setup on your Website.
What is Robots.txt?
Robots.txt is the text file that allows/disallows the search engine crawler bot to the website. And this Robot txt was very important to visible your site on Search engine. Your Website Ranking was Based on this robot.txt. This robot.txt was giving access to a crawler read the Website.
Steps to add Robot.txt Text Generator Tool Source Code to Blogger
Video Guide
Checkout:- Blogger Style Custom Robots.txt Text Generator
Steps to add Robots.txt Text Generator Tool Source Code to WordPress
Step 1: First, log in and Open your WordPress Admin Dashboard.
Step 2: Create a new post from the WordPress dashboard.
Step 3: Click + Icon to search HTML.
Step 4: Choose Custom HTML to paste our Robots.txt Text Generator Tool Source Code.
Step 5: Click Publish button to publish your post on your website.
Video Guide
Checkout:- WordPress Style Robot.txt Tool Generator
Download Sources
Note: This source code was completely free to use for everyone. No more need to ask my permission to use this code. Just mention our source code post link on your website. That will help us to grow more!
Source Code for Blogger
<h2 class="has-text-align-center" style="font-size:20px; color:#000000; position:relative; top:10px;"><strong>Robots.txt Generator</strong></h2>
<div style="background:#fff; width:auto; padding:10px 0px ; border-color: #f0f3f4; border-radius: 8px; border: 2px #a6acaf dashed; position:relative; ">
<center>
<button onclick="blogger()" id="bloggerstyle" class="buttonpost"><b>Blogger</b></button>
<button onclick="wordpress()"id="wordpressstyle" style="background:#ffffff; "class="buttonpost"><b>WordPress</b></button>
<br/>
<h6 class="spanpost"><b>Generate Robots.txt For <span id="website" style="color:#00ff00;">Blogger</span></b></h6><br/>
<span id="tagurl" style="font-size:12px; color:#a6acaf; position:relative; top:10px;">Enter Your Website URL with ‘https://’</span>
<input id="urlinput" class="inputpost" type="url" value="https://www.example.com"><br/>
<button onclick="generate()" id="generate" class="buttonpost" style="position:relative; top:5px; margin-bottom:15px;"><b>Generate</b></button>
<div id="loadingi" style="display:none;">
<div style="text-align: center;">
<!--Loading-->
Processing...</div>
</div>
<textarea readonly id="robots.txt" style=" resize: none; display:none;width:280px; outline:none; font-size:13px; border-radius:10px; background:#fff; height:300px;" type="url"></textarea> <br/>
<!-- Ad Content -->
<ins class="adsbygoogle"
style="display:inline-block;height:70px;width:100%;line-height:70px;"
data-ad-client=" "
data-ad-slot=" "></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<!-- Ad Content -->
<button id="copy.txt" onclick="copy()" class="buttonpost" style=" display:none;position:relative; width:100px;"><b>Copy</b></button>
<button id="refresh_me" value="Reload Page" onclick="document.location.reload(true)" class="buttonpost" style="display:none; position: relative; width: 100px;"><b>Refresh</b></button>
<span111 id="txtfile" style="display:none;" ># robots.txt generated by pixabin.com
User-agent: *
Disallow: /search/
Disallow: /blog/page/
Allow: /
Sitemap:
</span111>
<span121 style="display:none;"># robots.txt generated by pixabin.com
User-agent: *
Disallow: /search/
Disallow: /blog/page/
Allow: /
Sitemap:
</span121>
<span122 style="display:none;"># robots.txt generated by pixabin.com
User-Agent: *
Allow: /wp-content/uploads/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-content/plugins/
Disallow: /wp-admin/
Disallow: /blog/page/
Disallow: /search/
Sitemap:
</span122>
</center>
</div>
<style>
#pathl{stroke:#444444; fill:none; stroke-width:2;stroke-dasharray:316;animation:path 1s infinite linear;}@keyframes path{to{stroke-dashoffset:632;}}
.has-text-align-center{text-align:center}
.buttonpost{color:#444444; outline:none; background:#00ff00; margin-right:5px; width:110px; height:30px; font-size:16px; border-radius:10px; margin-left:5px; }
.spanpost{color:#444444; font-size:16px; }
.inputpost{position:relative;width:80%;line-height:0.5em;font-size:12px;color:#455065;background:#ebeff3;margin-top:5px;padding:15px;border-radius:8px;border:none;outline:0;}
</style>
<script>
<!--Main Script-->
function blogger(){var e=document.querySelector("span121").innerHTML;document.getElementById("txtfile").innerHTML=e,document.getElementById("website").innerHTML="Blogger",document.getElementById("wordpressstyle").style.background="#fff",document.getElementById("bloggerstyle").style.background="#00ff00"}function wordpress(){var e=document.querySelector("span122").innerHTML;document.getElementById("txtfile").innerHTML=e,document.getElementById("website").innerHTML="WordPress",document.getElementById("bloggerstyle").style.background="#fff",document.getElementById("wordpressstyle").style.background="#00ff00"}function generate(){var e=[document.querySelector("span111").innerHTML+document.getElementById("urlinput").value+"/sitemap.xml"];document.getElementById("loadingi").style.display="block",document.getElementById("robots.txt").style.display="block",document.getElementById("urlinput").style.display="none",document.getElementById("tagurl").style.display="none",document.getElementById("generate").style.display="none",setTimeout(function(){document.getElementById("loadingi").style.display="none"},5e3),setTimeout(function(){document.getElementById("copy.txt").style.display="block",document.getElementById("refresh_me").style.display="block"},5100),setTimeout(function(){document.getElementById("like").style.display="block"},5100),setTimeout(function(){!function t(n){n<e[n].length&&function e(t,n,o){n<t.length&&(document.getElementById("robots.txt").innerHTML=t.substring(0,n+1),setTimeout(function(){e(t,n+1,o)},50))}(e[n],-5,function(){t(n+1)})}(0)},5100)}function copy(){document.getElementById("robots.txt").select(),document.execCommand("copy"),document.getElementById("copy.txt").innerHTML="<b>Copied</b>"}
</script>
Source Code For Wordpress
<!--- Custom Robots.txt Generator Tool Open Source Code Developed by PIXABIN.COM --->
<div class="border-path">
<div class="wp-block-buttons has-text-align-center">
<div class="wp-block-button is-style-outline">
<a onclick="B()" id="blogger-btn" class="wp-block-button__link has-text-color" style="background: rgb(0, 0, 0); color: rgb(255, 255, 255);"><strong>Blogger</strong></a>
</div>
<div class="wp-block-button is-style-outline">
<a onclick="W()" id="wordpress-btn" class="wp-block-button__link has-text-color"><strong>WordPress</strong></a>
</div>
</div>
<p class="has-text-align-center"><strong>Generate Robots.txt For <span id="site-title-text" class="website-name has-global-color-1-color">Blogger</span></strong></p>
<p id="entry-title-text" class="has-text-align-center">Enter Your Website URL with <code>https://</code></p>
<input id="site-url" class="site-address" type="text" placeholder="Enter Your Website URL">
<textarea readonly="" id="robots-text" style="display:none;" class="robots-text"></textarea>
<div id="loading" class="has-text-align-center" style="display:none;">
<p class="has-global-color-1-color"><strong>Processing...</strong></p>
</div>
<div class="wp-block-buttons has-text-align-center">
<div class="wp-block-button is-style-fill buttonpost">
<a id="copy-text" onclick="C()" class="wp-block-button__link has-white-color has-global-color-1-background-color has-text-color has-background" style="display:none; border-radius:10px;"><strong>Copy Text</strong></a>
</div>
<div class="wp-block-button is-style-fill buttonpost">
<a id="generate-text" onclick="G()" class="wp-block-button__link has-white-color has-global-color-1-background-color has-text-color has-background" style="border-radius:10px"><strong>Generate</strong></a>
</div>
<div class="wp-block-button is-style-fill buttonpost">
<a id="refresh-page" onclick="window.location.reload();" class="wp-block-button__link has-white-color has-global-color-1-background-color has-text-color has-background" style="display:none; border-radius:10px;"><strong>Refresh Text</strong></a>
</div>
</div>
</div>
<maincode id="blogger-pre-text" style="display:none;"># robots.txt generated by tutsvip.com
User-agent: *
Allow: /
Disallow: /search/
Disallow: /blog/page/
Sitemap:
</maincode>
<bloggercode style="display:none;"># robots.txt generated by tutsvip.com
User-agent: *
Allow: /
Disallow: /search/
Disallow: /blog/page/
Sitemap:
</bloggercode>
<wordpresscode style="display:none;"># robots.txt generated by tutsvip.com
User-Agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap:
</wordpresscode>
<!--- PIXABIN.COM --->
<script>
function B(){
var x = 'Blogger';
var y = document.querySelector("bloggercode").innerHTML;
document.getElementById("blogger-pre-text").innerHTML = y;
document.getElementById("site-title-text").innerHTML = x;
document.getElementById('wordpress-btn').style.background='#ffffff';
document.getElementById('wordpress-btn').style.color='#000000';
document.getElementById('blogger-btn').style.background='#000000';
document.getElementById('blogger-btn').style.color='#ffffff';
}
function W(){
var x = 'WordPress';
var z = document.querySelector("wordpresscode").innerHTML;
document.getElementById("blogger-pre-text").innerHTML = z;
document.getElementById("site-title-text").innerHTML = x;
document.getElementById('wordpress-btn').style.background='#000000';
document.getElementById('wordpress-btn').style.color='#ffffff';
document.getElementById('blogger-btn').style.color='#000000';
document.getElementById('blogger-btn').style.background='#ffffff';
}
function G(){
var dataText = [document.querySelector("maincode").innerHTML + document.getElementById("site-url").value + '/sitemap.xml'];
document.getElementById('loading').style.display='block';
document.getElementById('robots-text').style.display='block';
document.getElementById('site-url').style.display='none';
document.getElementById('entry-title-text').style.display='none';
document.getElementById('generate-text').style.display='none';
setTimeout(function ()
{
document.getElementById('loading').style.display='none';},5000);
setTimeout(function ()
{
document.getElementById('copy-text').style.display='block';
document.getElementById('refresh-page').style.display='block';
},5100);
function typeWriter(text, i, fnCallback) {
if (i < (text.length)) { document.getElementById("robots-text").innerHTML = text.substring(0, i+1) ;
setTimeout(function() { typeWriter(text, i + 1, fnCallback) }, 50);
}
}
setTimeout(function ()
{
function StartTextAnimation(i) {if (i < dataText[i].length) { typeWriter(dataText[i], -5, function(){StartTextAnimation(i + 1);});} }StartTextAnimation(0);
},5100);
}
function C() {
var copyText = document.getElementById("robots-text");
var x = '<b>Text Copied</b>';
copyText.select(); document.execCommand("copy");
document.getElementById("copy-text").innerHTML = x;
}
</script>
<!--- PIXABIN.COM --->
<style>
/* Robots.txt CSS */
.is-style-outline>.wp-block-button__link:not(.has-background):hover {
background-color: #32373c!important;
border: 2px solid #32373c!important;
color: #fff!important;
}
.site-address {
background-color: #f7f7f7!important;
width: calc(100% - 1px)!important;
border-radius: 15px!important;
border: none!important;
margin-bottom: 15px;
font-size: 17px;
padding: 13px 15px!important;
box-sizing: border-box;
}
.robots-text {
background-color: #f7f7f7!important;
width: calc(100% - 1px)!important;
border-radius: 15px!important;
border: none!important;
margin-bottom: 15px;
font-size: 17px;
padding: 13px 15px!important;
box-sizing: border-box;
min-height: 12rem;
}
.wp-block-buttons {
margin-bottom: 15px
}
.border-path {
border-radius: 10px;
border: 2px #eeeeee solid;
padding: 20px 10px 5px 10px;
}
</style>
<!--- Custom Robots.txt Generator Tool Open Source Code Developed by PIXABIN.COM --->