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
-
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 -
Park Or 301
We main domain is **.com, but we have the other domain by name .ir.
Intermediate & Advanced SEO | | Pintapin
So now we want to remove (.ir).
what should we do? ,301? , park domain? Disallow?
Which is better for SEO?0 -
Penguin and 301 redirects...
Hi, I have several questions about starting a new domain due to Penguin. The site is: http://bajajlaw.com. Quick backstory: This site was hit every time Penguin rolled out. No clean-up was done until October 2015. At that time, I took over the project. My efforts include: (1) Remove'em, (2) manual removal, (3) and the Disavow Tool. The HP went from being at around #50 for the target KW (San Diego criminal defense attorney) to about #25. Never really moved higher than that. However, I redid the content for the internal pages (DV, Theft Crimes, etc.) and they are all ranking fairly well (first page or top of 2nd). In short, the penalty only seems to affect the HP, not the internal pages. Instead of waiting for Penguin to roll-out, client wants to move forward with new domain. My questions are as follow: 1. Can I use the same content for the internal pages and 301 from the old internal pages to the new? 2. Should I 301 from the old to the new domain for the HP, or not? 3. If I do a 301 from an internal page to a new internal page, does that have the same effect of doing a 301 from the old HP to the new HP? I have read various opinions on this topic. I'd appreciate feedback from anyone who has experience doing this sort of thing. Thanks. P.s. I'm inclined to wait for P4 to rollout, but given that nobody seems to know when that might be, it's hard for me to advise client to keep waiting for it.
Intermediate & Advanced SEO | | mrodriguez14400 -
301 Redirect pages with .aspx extension
I want 301 redirect all a website's subpages with a .aspx extension to a page without the .aspx etension. Example: I want to 301 redirect www.website.com/services.aspx to www.website.com/services Right now if you do not include .aspx on the end of every URL it gives a 404 error. I have used the web.config file to 301 redirect non-www to www and /default.aspx to /. I am not extremely familiar with IIS 7.0 or web.config, so any help would be great. Thanks.
Intermediate & Advanced SEO | | VentaMarketing0 -
2-stage 301 redirects
Dear colleagues, I have quite an unusual situation with one of my client's websites, and I could use an advise from someone who experienced the same circumstances: They are currently planning on launching a new site under the same domain (by September), when several key current pages are intended to be replaced with new equivalent pages under new URLs. So far it's pretty simple, BUT - due to a merger with another company they will be migrating their entire website to a different domain within a year. My question is - what would be the optimal solution for redirects? We are considering a 301 from the current pages to the new pages under the same domain, and once the new domain is activated - aside from defining 301 redirects from the new pages under the same domain to the new domain, we will cancel the original 301 from the old pages to the new pages on the same domain, and instead define new 301 for those pages to the new domain. What do you think? Is there a better solution - like using 302 redirects for the first stage? Has anyone tried such a procedure? Your input will be highly appreciated! Thanks in advance, Omer
Intermediate & Advanced SEO | | Usearch0 -
Sitemaps and subdomains
At the beginning of our life-cycle, we were just a wordpress blog. However, we just launched a product created in Ruby. Because we did not have time to put together an open source Ruby CMS platform, we left the blog in wordpress and app in rails. Thus our web app is at http://www.thesquarefoot.com and our blog is at http://blog.thesquarefoot.com. We did re-directs such that if the URL does not exist at www.thesquarefoot.com it automatically forwards to blog.thesquarefoot.com. What is the best way to handle sitemaps? Create one for blog.thesquarefoot.com and for http://www.thesquarefoot.com and submit them separately? We had landing pages like http://www.thesquarefoot.com/houston in wordpress, which ranked well for Find Houston commercial real estate, which have been replaced with a landing page in Ruby, so that URL works well. The url that was ranking well for this word is now at blog.thesquarefoot.com/houston/? Should i delete this page? I am worried if i do, we will lose ranking, since that was the actual page ranking, not the new one. Until we are able to create an open source Ruby CMS and move everything over to a sub-directory and have everything live in one place, I would love any advice on how to mitigate damage and not confuse Google. Thanks
Intermediate & Advanced SEO | | TheSquareFoot0 -
Subdomain canonicalisation
Hi Moz fans, I had a telephone conversation with an SEO company last week and they mentioned that the following "versions" of my domain were causing a canonicalisation issue; http://www.example.com www.example.com example.com I've already fixed the /index.html issue but do the above 3 also need to be fixed? Is the best solution to use a 301 redirect? As a side note, the SEOmoz web app doesn't identify these as being duplicate content... Regards, Ash
Intermediate & Advanced SEO | | AshSEO20110 -
How to 301 redirect ASP.net URLS
I have a situation where a site that was ASP.net has been replaced with a WordPress site. I've performed a Open Site Explorer analysis and found that most of the old pages, ie www.i3bus.com/ProductCategorySummary.aspx?ProductCategoryId=63 are returning a HTTP Status = NO DATA ... when followed ends up at the 404 catch-all page. Can I code the standard 301 Redirects in the .htaccess file for these ASP URLs? If not, I'm open to suggestions.... Thanks Bill
Intermediate & Advanced SEO | | Marvo0