301 Redirect without specifying base domain?
-
Hi guys,
about 10 minutes ago, I finally found the underlying problem in magento between 301 redirects and canonical tags - part of the reason why it was hard to identify was because the problem is not constant through all pages.
Anyway now that I found the problem, I have about 50 301 redirects to implement via .htaccess. Now I know the regular syntax is
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
But I'm wondering if there's a way that the base domain doesn't have to be specified in the second half of this line. Something like:
Redirect 301 /oldpage.html /newpage.html
I'm sure this can be done, somehow.
Thanks!
-
Just to bring closure to this thread, I never found an answer for this and simply ended up using the common syntax for 301 redirects in htaccess.
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
-
No I haven't tried it because I'm reluctant to try something as important as a 301 redirect without fully understanding it and knowing it will perform as intended.
-
Have you tested it with one URL to start?
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
-
I have a sub domain that has live content on it but the root domain redirects to another URL. I know this is not great but what are the implications?
I have a subdomain that is populated and has content. The root domain that the sub lives on redirects to an entirely different URL. I am trying to make a case as to why this isn't great besides the fact that it is just weird user experiences. What are the SEO implications etc. Would any equity that gets built up on the subdomain get passed along in the redirect? Or will there be indexation issues with Google? Cheers, Mark
Technical SEO | | mjsikorsky0 -
Purchasing a domain to redirect to a new domain (note same industry) - Black hat or White hat technique?
Hi Everyone, Ok so here is my question. I have a client who sells gourmet tea and gourmet spices. She has a culinary blog. There is a culinary blog that just posted that the website will be shut down in the near future. It has 100% white hat links. Would it be considered black hat to buy the domain and redirect it to my clients blog which is also a culinary blog? I would really like to ask Matt Cutts this question. Does anyone know how to send him questions? Thanks Carla
Technical SEO | | Carla_Dawson0 -
Best Practice on 301 Redirect - Images
We have two sites that sell the same products. We have decided to retire one of the sites as we'd like to focus on one property. I know best practice is to redirect apples to apples, which in our case is easily done since the sites sold the same thing. www.SiteABC.com/ProductA can be redirected to www.SiteXYZ.com/ProductA. My question is how far does that thinking go regarding images? Each product has a main product page, of course, and then up to 6 images in some cases. Is it necessary to redirect www.SiteABC.com/ProductA-Image1.jpg to www.SiteXYZ.com/ProductA-Image1.jpg? Or can they all be redirected to just the product page?
Technical SEO | | Natitude0 -
Does 301 redirect of old filenames still work?
I have gone through several revisions of my site. We used to have only static pages in HTML. I had search-engine-optimization.html changed to seo-philippines.html changed to /seo-philippines/ I 301 redirected all of them whenever I change the filenames. This is in the course of 6 years worth of link building and I'm wondering if this has an effect because our rankings go down everytime we do this.
Technical SEO | | optimind0 -
When to 301 a No1 ranking site to the new domain?
I have a site [company.com] that ranks number one for the products of my brand but I'm moving all the efforts to a dedicated brand domain. The old site covered a number of small brands and we had no dedicated brand sites, but we now focus on just this one brand and it doesn't belong on the old company domain name. BRAND belongs on the new brand.com Because of the age of the old company site and because it had the first copy about the brand, it's still ranking well for the brand product names, and the new site has some duplicate content issues that I'm in the throws of resolving. RANKS Company.com : number one for all product names Brand.com : nowhere for product brand names but top for the brand name (as I say, the product pages on this site have duplicate content issues which is likely keeping them ranked low - Hades low. I would rather not maintain two websites and I want to give brand.com every bit of available oomph , so should I at some point 301 the old company site to the new one? If so, is now the time? Thanks
Technical SEO | | Brocberry0 -
How long should you keep 301 redirects?
Hi, Back in 2009 I decided to update an older site from .htm and .shtml to .php. In order to minimize the impact I would go in every month and do a 301 redirect on the .shtml page to the new .php page. So I have many that range from 2009 through 2010. I had left the old 301's because I felt they would only be used if needed but I would think I should clean up my .htaccess by removing the old 301 redirects if they are not needed. How long should you keep this type of 301 redirect? Thanks!
Technical SEO | | Force70 -
301 Redirect & Linking Root Domain Count
Howdy Mozzers! If I do a 301 redirect from a domain that say has 200 linking root domains, to a fresh domain will the fresh domain now (when updated) have a linking root domain count of 200? Also, is it beneficial or detrimental to do a 301 redirect for an unrelated website i.e. garden hose website, to a children's playgorund equipment website in order to capture the link juice? Best
Technical SEO | | clickfactory0 -
Canonical tag, CNAME and 301 redirect
I have a website with a couple of domains pointing to one IP address. Let's say I have two domains www.example.com and www.example.ca I also see during my SEO analysis that the example.com and the www.example.com (same for the example.ca and the www.example.ca) are triggering server responses. How do I deal with this issue for best SEO. Canonical links? CNAME, or 301 redirects? thanks
Technical SEO | | casper4340