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
-
301 Domain Redirect from old domain with HTTPS
My domain was indexed with HTTPS://WWW. now that we redirected it the certificate has been removed and if you try to visit the old site with https it throws an obvious error that this sites not secure and the 301 does not happen. My question is will googles bot have this issue. Right now the domain has been in redirection status to the new domain for a couple months and the old site is still indexed, while the new one is not ranking well for half its terms. If that is not causing the problem can anyone tell me why would the 301 take such a long time. Ive double and quadruple checked the 301's and all settings to ensure its being redirected properly. Yet it still hasn't fully redirected. Something is wrong and my clients ready to ditch the old domain we worked on for a good amount of time. backgorund:About 30 days ago we found some redirect loops .. well not loop but it was redirecting from old domain to the new domain several times without error. I removed the plugins causing the multi redirects and now we have just one redirect from any page on the old domain to the new https version. Any suggestions? This is really frustrating me and I just can't figure it out. My only answer at this point is wait it out because others have had this issue where it takes up to 2 months to redirect the domain. My only issue is that this is the first domain redirect out of many that have ever taken more than a week or three.
Technical SEO | | waqid0 -
301 redirects delay in picking up
Hi I have been involved in the redesign/development of a website which has up until now had a lot of international traffic. On day of migration I uploaded all the 301 redirects to the website (wordpress) using Simple 301 redirect plugin. I tested a number of them and they appeared to be working. I also submitted the new sitemaps to Search Console. Since migration international traffic - particularly from countries such as india, Phillipines, Sri Lanka etc have significantly dropped off whereas the local traffic and some of the international traffic such as USA has remained fairly consistent. Looking at Analytics and entrances recently it appears as though search results are/were showing a number of pages with 404's (one in particular which received significant traffic and for which I had created a 301 redirection) - I have checked this page using the old url and it re-directs correctly for me and today asked a colleague in India to also check - he is getting the redirection fine. Does Google.in take a significantly longer time to pick these up in search results? Or am I missing something?
Technical SEO | | musthavemarketing0 -
Redirect if old browser or OS to other domain?
Hi, I use cloudflare free SSL option. All is fine except it wont work with windows XP . How do you think is it ok in case of old OS/Browser redirect visitors to other domain or subdomain? What could be impacts or consequences of such step? On the moment if page meko.lv is accessed from XP sp1,2 there is error. If it is possible how could such redirect look? Thanks
Technical SEO | | Mekounko0 -
Will doing a 301 redirect for one domain to another give the latter domain the formers links?
I have some websites that I built a few years ago that are still in existence, but I no longer have access to the sites as they weren't hosted by myself. These sites all carry a "Designed by Me" text on the footer with a link to my (now old) website. I have since done 301 redirects on the domain names that are used in the footers of these sites so they link directly to my new site. However, will these websites now show up on Google Webmasters for example as external links to my site?
Technical SEO | | mickburkesnr0 -
Changing a domain name, pages redirection
when changing a domain name, should we redirect all the pages to their new pages or only the indexed pages? Thanks
Technical SEO | | bigrat950 -
Redirect root domain to www
I've been having issues with my keyword rankings with MOZ and this is what David at M0Z asked me to do below. Does anyone have a solution to this? I'm not 100% sure what to do. Does it hurt ranking to have a domain at the root or not? Can I 301 redirect a whole site or do I have to do individual pages. "Your campaign is looking for rankings for the www version of the campaign but the URL resolves as a root domain. This would explain the discrepancy. Since there is no re-direct between the two, you can have brickmarkers.com 301 re-direct to www.site.com which will prevent you from re-creating your campaign to track the root domain. Once the re-direct is in place it will take a while for Google to show the www version in the results in which your campaign rankings will be accurate." Thanks
Technical SEO | | SeaDrive0 -
How does this rank? - a page that is 301 redirected
How does a 301ed page rank in google? In google I searched for" ikea.ca" which is set up as a 301 redirect to www.ikea.com/ca/en and was surprised to see the url --> www.ikea.ca actually ranking. IKEA Canada <cite>ikea.ca/</cite>IKEA Featuring Scandinavian modern style furniture and accessories. Include storage options, lighting, decor products, kitchen appliances and beds. Bedroom - Kitchen - Living Room - IKEA North York
Technical SEO | | Morris770 -
Global ecommerce domain redirecting to country specific TLD
We have a large ecommerce website xyz.com that redirects to xyz.ch. Recently the group expanded to India and they have launched a website called xyz.in. Depending upon the ip address, xyz.com redirects to xyz.in (for Indian audience) and redirects to xyz.ch elsewhere. Now xyz.in wants to rebrand themselves as xyz.com. To achieve this, we are planning a full-fledged, step-by-step, planned domain migration from xyz.in to xyz.com. We have two scenarios now. 1. xyz.com will continue to redirect to xyz.ch only in czech republic (depending upon ip) 2. xyz.com will cease to redirect to anywhere else. Can you advise us on the implications on both the scenarios? What's your best suggestion for us? It's slightly urgent. The management wants to take a quick action. But we want to be very sure about the implications from SEO point of view.
Technical SEO | | Gaadi0