How to prevent directory from being accessed by search engines?
-
Pretty much as the question says, is there any way to stop search engines from crawling a directory? I am working on a Wordpress installation for my site but don't want it to be listed in search engines until it's ready to be shown to the world. I know the simplest way is to password-protect the directory but I had some issues when I tried to implement that so I'd like to see if there's a way to do it without passwords. Thanks in advance.
-
But don't forget to remove that Disallow out of Robots.txt when you go live - if you want those pages to be indexed (and also the Meta-robots noindex nofollow).
Otherwise you might be pulling your hair out trying to figure out why none of your pages are getting indexed in the SERPs.
-
You're absolutely right! I left that part out. Thanks
-
The robots.txt file does not guarantee that your pages will not show up in search results! Your best bet after password protection is adding a NoIndex meta tag to you page headers.
Google have openly said that they obey this tag (Matt Cutts).
-
Xee,
It always help, and it is very easy to implement. This function to show the path to the sitemap ir very good.
-
It's not required to have the ending slash. At least, it works for us without it.
-
As it is, my site is just phpBB3 forums (www.bearsfansonline.com); would a sitemap really help that much?
-
If you don't have an robot.txt file, you need to include some important stuff first.
First, do you have a sitemap.xlm for your website? If not, its very important and you should creat it at: http://www.xml-sitemaps.com/
Create a robot.txt file and include the follow:
User-agent: * allow: / disallow: /directoryname
Sitemap: http://www.yousite.com/sitemap.xmlWith this you will inform all robots where is your sitemap. You should read more about robots.txt in this great post: http://www.seomoz.org/blog/robot-access-indexation-restriction-techniques-avoiding-conflicts
-
shouldn't you put a slash at the end of the directory in the robots file?
you can create the robots file through the Google Webmaster Tools
-
I don't have a robots.txt file in my root. Do I just create a text file, put the above lines into it, and upload it to my root after changing the name?
-
I'm assuming you want all search engines blocked from this directory. If so, edit your robots.txt file to state the following. This will block all bots from accessing a folder/directory on your site
User-agent: *
Disallow: /directoryname
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
-
Dynamic Canonical Tag for Search Results Filtering Page
Hi everyone, I run a website in the travel industry where most users land on a location page (e.g. domain.com/product/location, before performing a search by selecting dates and times. This then takes them to a pre filtered dynamic search results page with options for their selected location on a separate URL (e.g. /book/results). The /book/results page can only be accessed on our website by performing a search, and URL's with search parameters from this page have never been indexed in the past. We work with some large partners who use our booking engine who have recently started linking to these pre filtered search results pages. This is not being done on a large scale and at present we only have a couple of hundred of these search results pages indexed. I could easily add a noindex or self-referencing canonical tag to the /book/results page to remove them, however it’s been suggested that adding a dynamic canonical tag to our pre filtered results pages pointing to the location page (based on the location information in the query string) could be beneficial for the SEO of our location pages. This makes sense as the partner websites that link to our /book/results page are very high authority and any way that this could be passed to our location pages (which are our most important in terms of rankings) sounds good, however I have a couple of concerns. • Is using a dynamic canonical tag in this way considered spammy / manipulative? • Whilst all the content that appears on the pre filtered /book/results page is present on the static location page where the search initiates and which the canonical tag would point to, it is presented differently and there is a lot more content on the static location page that isn’t present on the /book/results page. Is this likely to see the canonical tag being ignored / link equity not being passed as hoped, and are there greater risks to this that I should be worried about? I can’t find many examples of other sites where this has been implemented but the closest would probably be booking.com. https://www.booking.com/searchresults.it.html?label=gen173nr-1FCAEoggI46AdIM1gEaFCIAQGYARS4ARfIAQzYAQHoAQH4AQuIAgGoAgO4ArajrpcGwAIB0gIkYmUxYjNlZWMtYWQzMi00NWJmLTk5NTItNzY1MzljZTVhOTk02AIG4AIB&sid=d4030ebf4f04bb7ddcb2b04d1bade521&dest_id=-2601889&dest_type=city& Canonical points to https://www.booking.com/city/gb/london.it.html In our scenario however there is a greater difference between the content on both pages (and booking.com have a load of search results pages indexed which is not what we’re looking for) Would be great to get any feedback on this before I rule it out. Thanks!
Technical SEO | | GAnalytics1 -
Another company is coming up in search results when I type in my phone number
If I search for my client's phone number on Google, without gaps, ie 02036315541, another company comes up at the top of the list. This company has a similar name to ours, but it is in a different town and it does different things. My company name is Energy Contract Renewals https://www.energycontractrenewals.co.uk/ and their company is https://energyrenewals.co.uk. As far as I can see, the other company does not mention our phone number anywhere on their site or on their GMB page so I don't know why they are coming up. We do not come up at all for this search. However, if I put our phone number in like this: 020 3631 5541, our company does come up and the other company does not. Anyone know how I can correct this or if it is even possible to do something about it?
Technical SEO | | mfrgolfgti1 -
Organic search traffic stats "leaking" into other channels?
Hi Everyone I have a website and am slowly getting to grips with SEO. Last week I enabled a new channel in google analytics which was "email" so I could track effectiveness of the weekly emails we send out. The good news is that a ton of traffic is now being assigned to the email "channel" in GA but my organic search traffic in channels is now down week on week. That feels odd as my overall traffic to the site is up, week on week. Does anyone have any experience of new channels coming on stream and canniballising old ones? Could it be that some of the traffic associated to organic search previously was actually coming from my email, I just didn't know it? thanks all!
Technical SEO | | NappyValleyNet1 -
Google rankings strange behaviour - our site can only be found when searching repeatedly
Hello, We are experiencing something very odd at the moment I hope somebody could shed some light on this. The rankings of our site dropped from page 2 to page 15 approx. 9 months ago. At first we thought we had been penalised and filed a consideration request. Google got back to us saying that there was no manual actions applied to our site. We have been working very hard to try to get the ranking up again and it seems to be improving. Now, according to several serps monitoring services, we are on page 2/3 again for the term "holiday lettings". However, the really strange thing is that when we search for this term on Google UK, our site is nowhere to be found. If you then right away hit the search button again searching for the same term, then voila! our website is on www.alphaholidaylettings.com page 2 / 3! We tried this on many different computers at different locations (private and public computers), making sure we have logged out from Google Accounts (so that customised search results are not returned). We even tried the computers at various retail outlets including different Apple stores. The results are the same. Essentially, we are never found when someone search for us for the first time, our site only shows up if you search for the same term for the second or third time. We just could not understand why this is happening. Somebody told me it could be due to "Google dance" when indices on different servers are being updated, but this has now been going on for nearly 3 months. Has anyone experienced similar situations or have any advice? Many thanks!
Technical SEO | | forgottenlife0 -
:8088 showing up on end of URL in natural Google search results
Hello All, Wondering if anyone has seen this before and might know what it is and how to get rid of it. As you can see on the attached image, when we search one of our popular keywords on google.com.au (doesn't happen on google.com btw) it has the following added on to the URL :8088 The link works fine, but it looks like an error message to anyone searching for us. The text for the listing comes from the home page meta info in the back-end of our site (Magento) but there isn't anything that looks out of place? Any ideas appreciated! Brian@CostumeBox.com.au 8088.JPG
Technical SEO | | costumebox0 -
Domain Name appear as title no description in search result
Hello Everyone, I have an site suppose tatadocomo.com( imaginary name to just explain my query) .Two weeksa back everything was fine but now if i search any query that site ranks in SERPs I got domain name as title and url (homepage) beneath of title and after that 'click here to proceed'. .Tata Docomo tatadocomo.com Click here to Proceed Why I am seeing this result in SERPs? I checked robots.txt , everything is fine there. Please help me out. Thanks
Technical SEO | | Alick3000 -
Web address change - Search impact?
Hi, I have whosjack.org and wjlondon.com - on there is a London relevant news and events website. whosjack.org has been the main site for some time and has decent search pick up. Currently wjlondon.com just redirects to whosjack.org. However - having london in our actual address would be far more beneficial for us. So ideally I want to swap the two web addresses around. Have the main site at wjlondon and have whosjack redirecting to it. However - I don't want to loose traffic from search. An idea I had was to create a sept site at wjLondon that was a feed of social content and links from whosjack so that it starts to get a decent search and then swap them over but not sure whether that would actually be detrimental what with all the dupe content issues with google etc. Any thoughts?
Technical SEO | | luwhosjack0 -
Domains redirect influence search rankings
Hi seomoz, I'm currently optimizing a website which is www.photobookworldwide.com and the ranking is on 2nd page, but looking at the result this morning, instead of showing photobookworldwide.com, it show other result which is www.photobooklaos.com on 2nd page for the keyword photobooks. Our web developer using virtual domain, and redirected photobooklaos.com to photobookworldwide.com. Any solution for this? need you guys to help me on this. Cheers Gerald
Technical SEO | | greathokage0