301 redirect relative or absolute path?
-
Hello everyone,
Recently we've changed the URL structure on our website, and of course we had to 301 redirect the old urls to the coresponding new ones.
The way the technical guys did this is:
"http://www.domain.com/old-url.html" 301 redirect to "/new-url.html"
meaning as a relative redirect path, not an absolute one like this:
"http://www.domain.com/old-url.html" 301 redirect to "http://www.domain.com/new-url.html"This happened for few thousands urls, and the fact is the organic traffic dropped for those pages after this change. (no other changes were made on these pages and the new urls are as seo friendly as possible, A grade on On-Page Grader).
The question is: does the relative redirect negatively affects seo, or it counts the same as an absolute path redirect?
Thanks,
S. -
Thanks Ari!
-
Hi Silviu
It is as Ari said - source URL is relative and destination URL is absolute.
Peter
-
the destination URL should 100% be absolute!
-
Thank you for the tip Ari, but our website is not using apache and htaccess, so the rules are written in another language, but I'm sure this is not important.
The http status of the old urls is 301 to the new relative paths /new-url.html
and this is where my problem is:
Should the destination url (the new one) be relative or absolute?Silviu
-
301 Redirects should always be programmed and thought of us relative to full path.
in htaccess, it should look like this:
redirect 301 /old-page-name.html http://www.full-website-name.com/new-page-name.html
redirect 301 /old-page-name2.html http://www.full-website-name.com/new-page-name2.htmland so on and so forth..
Which pages lost traffic - old ones or new ones? If you could send an example (or email it if you're willing) id be happy to take a peak.
-
Hi Silviu
There is always the possibility of some SEO value being lost when you implement a 301 redirection so that may be why you have seen a hit.
Have a look at Moz's information on this here...
Note this paragraph: A 301 redirect is a permanent redirect which passes between 90-99% of link juice (ranking power) to the redirected page. 301 refers to the HTTP status code for this type of redirect. In most instances, the 301 redirect is the best method for implementing redirects on a website.
One thing though, I have never seen relative redirection for the same domain written as "http://www.domain.com/old-url.html" 301 redirect to "/new-url.html" but always as "/old-url.html" 301 redirect to "http://www.domain.com//new-url.html". I'm not saying the other way wouldn't work - which if the links are working correctly when you follow them they clearly are - but just not seen that.
I hope the above helps,
Peter
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
-
How to Choose destination page for a 301 redirect?
I am doing some SEO for a wedding chapel in Vegas. There are some old packages that no longer exist and the bounce rate for the page is high so I am planning to 301 the page. How to best determine the best 301 destination? I have a few options. As an example the page was optimized for garden weddings. The page itself does not place well in the SERPS for garden weddings in Las Vegas, but our outdoor wedding packages in Las Vegas page places in the top 10. So that page is in an option. However, there is a different location that has a garden setting. Is that a better choice? Some content might match better than others, but any page I choose would be relevant content. Thank you so much 🙂
Technical SEO | | leslieevarts0 -
Can i do 301 redirect
So this is what im doing, 301 redirect to my site/allen-webdesign points to main domain Allen is the city i have a page called local-webdesign with all the cities. Will this improve my ranking or should i stop?
Technical SEO | | jsdfw0 -
Redirect a 301 Redirect
Does any link juice get passed from a permanent redirect to a new 301 redirect? If so, are there any studies which indicate an estimated percentage?
Technical SEO | | RedCaffeine0 -
Where to put 301 redirects in Magento?
I will be changing the URL structure in a magento store from "base/category/subcategory/product" to "base/product" which means i have to make over 1000 URL 301 redirects so our old links still work. Should i put the redirects in a .htaccess file so they stay intact no matter what or should i just put them in with all the other rewrites (in Magento 's URL rewrite manager)? Thanks
Technical SEO | | tilenkrivec0 -
Will bad things happen if I cancel 301 site redirect?
Hi, please someone help! We have two identical websites, say A & B. Because of the not so good SEO establishment, site B was built and site A was 301 redirected to site B weeks ago. For some reasons, we have to reuse site A, which means we have to cancel the 301 redirection. (Sound a little crazy) So the question are: 1. Can we conduct the action? 2. If we cant, what's the reason? 3. If we can, what would be the best practice? Thanks for help in advance! Plus: we also CARE what would happen to site B if the 301 is cancelled? Will it grow healthy like a new site?
Technical SEO | | Squall3150 -
How to write 301 redirects in WordPress
I've successfully migrated new site to new domain (www.cmsearchmarketing.com) But I cannot get 301 redirects for pages and blog posts to redirect from the old domain (www.creativemindsearchmarketing.com). And it's my understanding I need to do a 301 for each page to maintain SEO. Here's what I've tried: RewriteCond %{QUERY_STRING} ^p=975$RewriteRule ^index.php$ http://www.cmsearchmarketing.com/top-5-questions-to-ask-an-seo-firm-before-signing-up/? [R=301,L] BEGIN WordPress<ifmodule mod_rewrite.c="">RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</ifmodule># END WordPress #AND ALSO# Use PHP5 Single php.ini as defaultAddHandler application/x-httpd-php5s .php BEGIN WordPress<ifmodule mod_rewrite.c="">RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</ifmodule># END WordPress redirect 301 /top-5-questions-to-ask-an-seo-firm-before-signing-up http://www.cmsearchmarketing.com/top-5-questions-to-ask-an-seo-firm-before-signing-up/ Any suggestions would be appreciated. _Cindy P.S. Maybe some other issues are in the way: --Old site is WP-Remix theme no longer supported, and latest WP version is 2.9.1 -- Old domain (www.creativemindsearchmarketing.com) is the primary account on BlueHost …and the new domain (www.cmsearchmarketing.com) is an addon, so the new domain's directory is within root of old domain. -- in root domain of old site there are other "handler files" that also have base file rewrites, if this is an issue: name of this file in root directory is:
Technical SEO | | CeCeBar
.htaccess.addHandlerBak -FrontPage- <limit get="" post="">order deny,allowdeny from allallow from all</limit><limit put="" delete="">order deny,allowdeny from all</limit>AuthUserFile /home/creatjo7/public_html/_vti_pvt/service.pwdAuthGroupFile /home/creatjo7/public_html/_vti_pvt/service.grp# BEGIN WordPress<ifmodule mod_rewrite.c="">RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</ifmodule> END WordPressAuthName creativemindsearchmarketing.comIndexIgnore .htaccess /.?? *~ *# /HEADER /README /_vti0 -
How many jumps between 301 redirects is acceptable?
For example, I have a page A that should be redirected to page D, but instead A redirects to B, B redirects to C and C redirects to D. It's something I came across and wondering if its worth the dev time to change it. Thanks!
Technical SEO | | pbrothers240 -
Too many 301 redirects - good or bad?
Hi, Currently, page A is redirecting to page B. I am in the process of developing new site for the same domain and this time page B will be redirected to page C. This is gonna happen on many pages. Is it correct or should i adopt some other strategy? Will it have adverse effect on the speed of my site? Page A -----> Page B ------> Page C Regards, Shailendra
Technical SEO | | IM_Learner0