Remove a directory using htaccess
-
Hi,
Can someone tell me if there's a way using htaccess to say that everything in a particular directory, let's call it "A", is gone (http 410 code)? i.e. all the links should be de-indexed?
Right now, I'm using the robots file to deny access. I'm not sure if it's the right thing to do since Google webmaster tools is showing me the link as indexed still and a 403 error code.
Thanks.
-
<colgroup><col width="205"> <col span="14" width="64"></colgroup>
| Hello webtarget, First of all I want to tell you about the .htaccess file, It is the file which control the Apache webserver, is very useful and allows you to do a lot of things. |
| Here the below is the link which solves your whole problem regarding .htaccess file. Please check & review it. | | | | | | |
| http://www.catswhocode.com/blog/10-awesome-htaccess-hacks-for-wordpress | | | | | | | | | | -
That's great thanks.
-
Hi
This should solve your problem
<code>RewriteEngine on
RewriteCond %{REQUEST_URI} ./folder/.
RewriteRule (.*) http://www.yourdomain.com/gone.php [R=410,L]</code>Replace "folder" with the name of your folder and instead of a
<code>http://www.yourdomain.com/gone.php</code>
put link towards the page informing visitors that request resource is gone.
Kind regards
Bojan
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
-
Use of iFrames to embed video content?
So we decided to add interesting video content we have shot ourselves to improve the user experience on our website. We have read though all the SEO material and advice we could find and decided to use Vimeo to host our videos instead of self-hosting. The videos themselves will not show up on Vimeo or Google as we set our account to 'private', but we notice that to embed the videos on our website - the embed code is an iFrame. My question's are, aren't iFrames supposed to be bad for SEO? Should we look to another video hosting solution instead? If other websites embed our videos on their site using the iFrame, do we get any SEO credit or the backlink? Thx.
Technical SEO | | Liam-Web0 -
Remove Directory
www.enakliyat.com.tr/detaylar/page-6255 www.enakliyat.com.tr/detaylar/page-6240 www.enakliyat.com.tr/detaylar/page-6253 www.enakliyat.com.tr/detaylar/page-6255 ..... ..... ..... We have so many page like this page and we want to remove all this page from Google search results. How can I remove from Google Webmaster Tools Help!
Technical SEO | | iskq0 -
Duplicate Content - Reverse Phone Directory
Hi, Until a few months ago, my client's site had about 600 pages. He decided to implement what is essentially a reverse phone directory/lookup tool. There are now about 10,000 reverse directory/lookup pages (.html), all with short and duplicate content except for the phone number and the caller name. Needless to say, I'm getting thousands of duplicate content errors. Are there tricks of the trade to deal with this? In nosing around, I've discovered that the pages are showing up in Google search results (when searching for a specific phone number), usually in the first or second position. Ideally, each page would have unique content, but that's next to impossible with 10,000 pages. One potential solution I've come up with is incorporating user-generated content into each page (maybe via Disqus?), which over time would make each page unique. I've also thought about suggesting that he move those pages onto a different domain. I'd appreciate any advice/suggestions, as well as any insights into the long-term repercussions of having so many dupes on the ranking of the 600 solidly unique pages on the site. Thanks in advance for your help!
Technical SEO | | sally580 -
Noindex vs. page removal - Panda recovery
I'm wondering whether there is a consensus within the SEO community as to whether noindexing pages vs. actually removing pages is different from Google Pandas perspective?Does noindexing pages have less value when removing poor quality content than physically removing ie. either 301ing or 404ing the page being removed and removing the links to it from the site? I presume that removing pages has a positive impact on the amount of link juice that gets to some of the remaining pages deeper into the site, but I also presume this doesn't have any direct impact on the Panda algorithm? Thanks very much in advance for your thoughts, and corrections on my assumptions 🙂
Technical SEO | | agencycentral0 -
Examples of sites using hreflang
Hi all, I'll soon be doing some work for a worldwide company who are launching a new site. The new site is a near clone of another of their sites in another country. Obviously I'll need to make use of rel="alternate" hreflang="x" on both sites. I've read all the Google documentation etc but was wondering if you guys could point me in the direction of a few sites which are currently implementing the tag successfully. Thanks in advance,
Technical SEO | | iProspect-Ireland0 -
How oftern should I use press relese
We are using press release agency to publish our new products/brands/offers. I realise this would increase our links. Would this be a good method and would those links be permanent? Can I publish as many as I want so I end up with many good links from trust source? Am I doing the right thing?
Technical SEO | | LauraHT0 -
Using Drupal to Author Websites across 2 Domains
I am new to Drupal and as an organization we are considering using it to author both our corporate site and our blog. In the future we'd like our blog to live at a separate domain and I understand Drupal is capable of publishing across 2 domains. Does anyone know of any SEO implications to this type of infrastructure set up? Are there specific things to be mindful of when setting up the Drupal CMS across 2 domains? thanks for the assistance!
Technical SEO | | Hershel.Miller0 -
Can a site be removed from alexa?
let's say you have complete control over the webserver, and the hosting server. is there a way to set it up so that alexa statistics CANNOT be gained?
Technical SEO | | highersourcesites0