Is it possible to 301 re-direct an entire subfolder on a subdomain?
-
So, for example,
subdomain.domain/folder
subdomain.domain/folder2
Is it possible to set up a 301-re-direct for an entire folder on a subdomain?
If so, how? What is the correct code for this?
-
This all depends on what your site is written in. We have an extensive guide for Apache, and in this post, Jen links to several other rewrites in different languages.
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
-
Subfolder cannibalization
Hello, I looked through the forum but couldn't find an answer so here is my question: A client have 2 subfolders that are selling the same things for example Furnitures, Office Furniture, Bedroom Furniture, etc. The website looks like this : www.website.com/subfolder1/ www.website.com/subfolder2/ But it's like 2 diferents brand, just that it sells the same kind of product. The company wants to put evereything in subfolder1 and stop the subfolder2, which mean stop the second brand. But the thing is that right now the subfolder2 have better positions in SEO than subfolder1 for most of the Keywords. How could I make all the internet traffic goes from the subfolder2 to the subfolder1 ?
Intermediate & Advanced SEO | | Sodimaccl
A 301 redirection could do the trick ? In addition of improving the SEO (Title, H1, Meta, etc) of the subfolder1 ? Thanks for your help.0 -
After 301 redirect
hello i do after 301 redirect from old domain to new since 3 month ago my qa : should i replace the backlinks links to new doamin Or the he backlinks in the old link will works
Intermediate & Advanced SEO | | cristophare790 -
Blog subdomain not redirecting
Over the last few weeks I have been focused on fixing high and medium priority issues, as reported by the Moz crawler, after a recent transition to WordPress. I've made great progress, getting the high priority issues down from several hundred (various reasons, but many duplicates for things like non-www and www versions) to just five last week. And then there's this weeks report. For reasons I can't fathom, I am suddenly getting hundreds of duplicate content pages of the form http://blog.<domain>.com</domain> (being duplicates with the http://www.<domain>.com</domain> versions). I'm really unclear on why these suddenly appeared. I host my own WordPress site ie WordPress.org stuff. In Options / General everything refers to http://www.<domain>.com</domain> and has done for a number of weeks. I have no idea why the blog versions of the pages have suddenly appeared. FWIW, the non-www version of my pages still redirect to the www version, as I would expect. I'm obviously pretty concerned by this so any pointers greatly appreciated. Thanks. Mark
Intermediate & Advanced SEO | | MarkWill0 -
Subdomain blog vs. subfolder blog in 2013.
Having read this ( http://www.seomoz.org/q/blog-on-a-subdomain-vs-subfolder ) & countless of blog posts on never to put your blog on a domain because a subdomain is treated as a different site & your blog traffic won't help with your main sites authority. I've always pushed for subfolder blogs. However I've been seeing a lot of blogs now and days saying that Google is now treating subdomains as the same site as your main site. http://www.brafton.com/news/subdomains-vs-subdirectories-for-seo-no-serp-benefits-for-subdomains-anymore http://webmasters.stackexchange.com/questions/34173/subdomains-vs-subdirectory-status-as-of-2012/34366#34366 ETC... What does everyone think? Is it acceptable to have a blog in a subdomain in 2013? Thanks!
Intermediate & Advanced SEO | | DCochrane0 -
How do I 301 Redirect a complete folder?
Hi, I am want to delete a folder and all the contents. I then need to redirect anyone that is trying to reach a file in that folder to another page on my site. example: www.mydomain.com/folder/ (contains 50 pages) I want to delete the folder and all 50 pages. So if someone tries to reach www.mydomain.com/folder/page1.php the redirect would take them to a specific page on my site. Doing this to clean up old content. How would I do this on the .htaccess? I have redirected a page but not a folder. Thanks in advance! Force7
Intermediate & Advanced SEO | | Force70 -
How long do 301 redirects have to stay in place?
For a large retail site we have plenty of "old" pages that are 2-3 years old and still have 301 redirects to a new page. After a search engine has recognized a 301 redirect and dropped the "Old" URL from the index and started displaying the "New" URL, is it safe to delete that old page and thus remove the 301 redirect?
Intermediate & Advanced SEO | | SEOmoxy0 -
Duplicate Content On A Subdomain
Hi, We have a client who is currently close to completing a site specifically aimed at the UK market (they're doing this in-house so we've had no say in how it will work). The site will almost be a duplicate (in terms of content, targeted keywords etc.) of a section of the main site (that sits on the root domain) - the main site is targeted toward the US. The only difference will be certain spellings and currency type. If this new UK site were to sit on a sub domain of the main site, which is a .com, will this cause duplicate content issues? I know that there wouldn't be an issue if the new site were to be on a separate .co.uk domain (according to Matt Cutts), but it looks like the client wants it to be on a sub domain. Any help/advice would be greatly appreciated.
Intermediate & Advanced SEO | | jasarrow0 -
How To 301 Redirect .html pages
I need to redirect a page/URL that is purely .html to a new location. I don't know how to do this. All the redirects I can find are for server side code pages .php/.aspx etc. From my understanding I can't put a server side redirect in a .html file. I am hosting on a microsoft server, however the new page I am redirecting to is .php. I am running some WordPress (.php) files on the server. I need to make it redirect before the old page loads so visitors don't start reading something that is about to get redirected Can someone please help me?
Intermediate & Advanced SEO | | MyNet0