Robots.txt Help
-
I need help to create robots.txt file.
Please let me know what to add in the file. any real example or working example.?
-
Michael, from what i can tell, your website is built using WordPress. We typically recommend installing the Yoast SEO plugin and using that--which will help with your robots.txt file. If you need more information, take a look here: https://yoast.com/wordpress-robots-txt-example/
Generally, most of your site won't need to be disallowed in the robots.txt file, unless you're using tags and categories on your site. Yoast typically helps disallow the proper directories that you need to disallow.
One thing that you need to be aware of is the fact that you don't want to disallow your .CSS or .JS files on your site, many of the themes nowadays will put those files in your wp-admin folder--which by default typically gets disallowed.
-
This is the site I used to really get a good understanding of how to create a robots.txt file: http://www.robotstxt.org/
-
A very basic robots.txt file would look something like the below
User-agent: *
Sitemap: http://www.yourwebsite.com/sitemap.xml
Disallow: http://www.yourwebsite.com/url-you-dont-want-indexed
Disallow: http://www.yourwebsite.com/another-url-you-dont-want-indexedHope that helps
-
Include sitemaps. Disallow: Pages that you don't want indexed: search pages, login pages, core admin files.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Sudden Rankings Drop for Good Keywords.. Did I Do This? Please Help :(
Hello, I noticed a gradual rankings drop for 3 important keywords over the last month, with a pretty big plummet the last two weeks. Overall in the last month+ we dropped from position 9 to 41.I noticed this when I dug further after noticing traffic dropping since February (not a drastic traffic drop). I should note that the keywords took people to my client's homepage. Their branded keywords have no suffered and I looked at a couple others that haven't either. Now, there is a link in the site footer (we have site wide header and footer) that takes you to a static page that contains links for the 2 digital flipbook catalogs the customer has (one for US and one for Canada). My concern is that at the end of January I had a developer implement a noindex/nofollow meta robot & robots.txt disallow specifically on the HTML pages/URL of the Canadian catalog ONLY. It specifically pointed to that flipbook URL. This catalog is nearly identical to the US catalog and I thought I'd be eliminating duplicate content and helping with crawl budget. After looking further into it last week (reading up about internal nofollows not necessarily being detrimental, but not recommended) and noticing the drop in search visibility traffic (starting gradually in March), I had the disallow/nofollow removed. This was last week, and over this last week the traffic took an even bigger drop (not amazingly drastic but enough to be concerned) and I noticed the keywords that we did ok for dropped even more this last week (down to 41). I'm concerned this has to do with the change I made at the end of January and reversed back. I should note that I don't think these catalogs or the static page that links to them brought any traffic. The keywords I am concerned about fell on our homepage (where the link to the static page that contains the links to both catalogs is in the sitewide footer) The catalogs are a couple hundred pages. I honestly don't see how this could do it, unless it has something to do with the footer being sitewide? There have been site upgrades/dev changes over the last couple months too (although I am not sure if that affected other clients who received the same upgrade), so this is hard to pinpoint. Sorry this is so long but I'd appreciate someone offering some insight to help ease my mind a bit!
Intermediate & Advanced SEO | | AliMac260 -
Using "nofollow" internally can help with crawl budget?
Hello everyone. I was reading this article on semrush.com, published the last year, and I'd like to know your thoughts about it: https://www.semrush.com/blog/does-google-crawl-relnofollow-at-all/ Is that really the case? I thought that Google crawls and "follows" nofollowed tagged links even though doesn't pass any PR to the destination link. If instead Google really doesn't crawl internal links tagged as "nofollow", can that really help with crawl budget?
Intermediate & Advanced SEO | | fablau0 -
Our parent company has included their sitemap links in our robots.txt file - will that have an impact on the way our site is crawled?
Our parent company has included their sitemap links in our robots.txt file. All of their sitemap links are on a different domain and I'm wondering if this will have any impact on our searchability or potential rankings.
Intermediate & Advanced SEO | | tsmith1310 -
How can I improve my rankings in Google with help of seomoz
Hey guys, I have joined seomoz today and set up campaigns for my sites. I got reports about keyword rankings, errors, notices etc. But I am still confused about how to use seomoz in order to improve my rankings. My point is does seomoz provides any services for improving position in google or simply seomoz provides only reporting? These reports are good but my ultimate goal to join seomoz is to improve my rankings for my each website and each post. Please help. BJ
Intermediate & Advanced SEO | | intmktcom0 -
Redirect help
I work for a company that has a domain that is something like www.neat-stuff.com but most people just use www.neatstuff.com without the dash. The redirect for the homepage works fine. We recently launched a new site and if you use www.neat-stuff.com/category it redirects from the old site to the new site just fine. However if you use www.neatstuff.com/category it does not properly redirect to www.neat-stuff.com/category. How do I fix that?
Intermediate & Advanced SEO | | EcommerceSite0 -
Seeking Help with Domain Acquisition Redirect Strategy
My company is purchasing www.boughtsite.com. This new site has multiple sub-domain sites: customsite1.boughtsite.com, customsite2.boughtsite.com, etc. 1. Is it possible to redirect everything from www.boughtsite.com to www.mycompanysite.com while leaving the other sub-domain sites active? These other sites have different audiences than our main site. 2. Would it be an okay solution to just place a link on boughtsite.com to mycompanysite.com telling visitors "We have been re-branded to My Company" 3. Can I use an i-frame to move customsite1.boughtsite.com to www.mycompanysite.com/customsite1 instead? Thanks for your input!
Intermediate & Advanced SEO | | pbhatt0 -
Redirect Help - Domain Change and Website Redesign
Hi there, I've redesigned a website for a client, but we are also changing domains and I'm trying to figure out the best way to set up the redirects from their old domain to the new one. 95% of their search engine traffic originally came through brand related keywords that landed on their homepage, and most of the remaining 15% landed on 3 other pages. The new site has pages to replace these 3 main SEO pages, and I'm about to set 301 redirects from their old domain, but I can't figure out the quickest/best way to do it. Is it possible to set up a specific redirect for the 4 main pages (Home + plus the 3 others) then a "catch all" type of thing for the rest of the pages, that redirect either to the homepage, or some sort of "Check out our new Site" landing page. How do you do this, or is there a better way to set it up? Thanks!
Intermediate & Advanced SEO | | timscullin0 -
Does using robots.txt to block pages decrease search traffic?
I know you can use robots.txt to tell search engines not to spend their resources crawling certain pages. So, if you have a section of your website that is good content, but is never updated, and you want the search engines to index new content faster, would it work to block the good, un-changed content with robots.txt? Would this content loose any search traffic if it were blocked by robots.txt? Does anyone have any available case studies?
Intermediate & Advanced SEO | | nicole.healthline0