Handling Multiple Domain 301 Redirects on Single htaccess file
-
Hello,
I have a client that currently that has 9 different markets with different sub-domains on one server (aka one htaccess file.). All the sites have very similar Navigation and some of them contain the same products aka same URLs. The site is using Magento CMS and I'm trying to figure out how to redirect some products that have been removed from one of the stores. The problem I'm running into is when I try to redirect one store url, it redirects all the site's URLs.
Example
I'd like to redirect http://store.domain1.com/old-url.html to http://store.domain1.com/new-url.html without making http://store.domain2.com/old-url.html redirect.
I've literally been pulling out my hair trying to figure this one out but have had no luck. Does anybody have any ideas on how I could do this without having the sites redirect or create any loops?
Any wisdom from you apache experts would be greatly appreciated.
Thanks, Erik
-
Hi Erik,
How are you trying to do the redirect? Can you share the code? I'm not an .htaccess guru, but some of the guys here are.
-Andy
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
-
Is domain authority lost if you create a 301 redirect but mark it as noindex, nofollow?
Hi everyone, Our company sells products in various divisions. While we've been selling Product A and Product B under our original brand, we've recently created a new division with a new domain to focus on a Product B. The new domain has virtually no domain authority (3) while the original domain has some (37). We want customers to arrive on the new domain when they search for key search terms related to Product B instead of the pages that previously existed on our main website. If we create 301 redirects for the pages and content on the main site and add noindex, nofollow tags, will we lose the domain authority that we have from our original domain because the pages now have the noindex, nofollow tags? I read a few blog posts from Moz that said there isn't any domain authority lost with 301 redirects but I'm not sure if that is true if the pages are noindex, nonofollow. Do you follow? 🙂 Apologies for the lengthy post. Love this community and the great Moz team. Thanks, Joe
Intermediate & Advanced SEO | | jgoehring-troy0 -
Onsite Videos- Multiple on a Single Page- How to Optimize?
I have a specific page which needs multiple videos. A primary video of the client (Youtube Video) and two secondary videos with patient testimonials (Wistia Videos). Here is the actual page: https://www.johnbarrasdds.com/houston-tmj-dentist/ My understanding is Google only values the first video on a page. Is this accurate and either way what is the best practice for how to post the second group of videos and gain SEO value? Thanks!
Intermediate & Advanced SEO | | mgordon0 -
Should I redirect my Google Update Effected Domain to brand new Domain?
Hey Moz experts, I had a domain which was really doing better but after the Humming Bird update my traffic was decreased up to 90%. There are plenty of posts on my existing blog, Now what should I do? I mean should I redirect it to a brand new domain or Copy all the posts to a brand new domain and delete my existing domain? Note that the Old domain has PR1, DA 19 and PA 30.
Intermediate & Advanced SEO | | imran20780 -
Too many 301 redirects?
Hey, My company currently has one chief website with about 500-600 other domains that all feature the same material as the chief website. These domains have been around for about 5 years and have actually picked up some link traffic. I have all of these identical web-pages utilizing rel=canonical but I was wondering if I would be better served, from SEO purposes, to 301 redirect all of these sites to their respective pages on our chief website? If I add 500 301 redirects, will the major search engines consider this to be black-hat link-building even though the sites are related and technically already feature the same content? For an example, the chief website is www.1099pro.com and I would 301 redirect the below sites to the chief site: 1099softwarepro.com 1099softwarepro.info 1099softwarepro.net 1099softwarepro.biz 1099softwareprofessionals.com 1099softwareprofessionals.info ...you get the point
Intermediate & Advanced SEO | | Stew2220 -
301 Redirect htaccess
Hi Guys, I have a website that has plenty of links with parameters. For example:
Intermediate & Advanced SEO | | UrbanMark
http://www.domainname.co.uk/index.php?app=ecom&ns=catshow&ref=Brandname-Golf-Shorts&sid=201v04gxs2hlozv161tfo43qk98583el I want to place a wildcard redirect on the .htaccess but don't know what exactly code for this. Ideally I want the URLs above to be: http://www.domainname.co.uk/Category/Brandname-Golf-Shorts Any help pls. Thanks,
Brucz0 -
DNS or 301 Website Redirect
We are running a marketplace site, so we have thousands of vendors selling their products on our site. Each vendor has a Profile page and we are soon to launch a premium store-front that is white label. Many of these vendors will want to point a custom url to their premium store-front (which is a sub domain of the marketplace) and we are trying to get an understanding of how we should instruct them to point their url in a way that will give the main marketplace site the seo juice. We also want to understand what will show up in the address bar. Will it be their url or our sub domain? Will any of the marketplace seo juice boost their url local listing status?
Intermediate & Advanced SEO | | bloomnation0 -
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 -
301 redirect for duplicate content
Hey, I have just started working on a site which is a video based city guide, with promotional videos for restaurants, bars, activities,etc. The first thing that I have noticed is that every video on the site has two possible urls:- http://www.domain.com/venue.php?url=rosemarino
Intermediate & Advanced SEO | | AdeLewis
http://www.domain.com/venue/rosemarino I know that I can write a .htaccess line to redirect one to the other:- redirect 301 /venue.php?url=rosemarino http://www.domain.com/venue/rosemarino but this would involve creating a .htaccess line for every video on the site and new videos that get added may get missed. Does anyone know a way of creating a rule to rewrite these urls? Any help would be most gratefully received. Thanks. Ade.0