undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • MozCon

      Save on Early Bird tickets and join us in London or New York City

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

Browse the forum for helpful insights and fresh discussions about all things SEO.

  1. Home
  2. SEO Tactics
  3. Technical SEO
  4. 301 redirect relative or absolute path?

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

301 redirect relative or absolute path?

Technical SEO
3
7
25.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • Silviu
    Silviu last edited by Oct 23, 2013, 8:33 AM

    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.

    1 Reply Last reply Reply Quote 0
    • Silviu
      Silviu @AriNahmani last edited by Oct 24, 2013, 7:01 AM Oct 24, 2013, 7:01 AM

      Thanks Ari!

      1 Reply Last reply Reply Quote 0
      • crackingmedia
        crackingmedia @Silviu last edited by Oct 24, 2013, 6:47 AM Oct 24, 2013, 6:47 AM

        Hi Silviu

        It is as Ari said - source URL is relative and destination URL is absolute.

        Peter

        1 Reply Last reply Reply Quote 1
        • AriNahmani
          AriNahmani @Silviu last edited by Nov 18, 2013, 3:33 PM Oct 24, 2013, 6:45 AM

          the destination URL should 100% be absolute!

          Silviu 1 Reply Last reply Oct 24, 2013, 7:01 AM Reply Quote 1
          • Silviu
            Silviu @AriNahmani last edited by Oct 24, 2013, 6:30 AM Oct 24, 2013, 6:30 AM

            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

            AriNahmani crackingmedia 2 Replies Last reply Oct 24, 2013, 6:47 AM Reply Quote 0
            • AriNahmani
              AriNahmani last edited by Oct 23, 2013, 7:58 PM Oct 23, 2013, 7:58 PM

              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.html

              and 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.

              Silviu 1 Reply Last reply Oct 24, 2013, 6:30 AM Reply Quote 0
              • crackingmedia
                crackingmedia last edited by Oct 23, 2013, 9:07 AM Oct 23, 2013, 9:07 AM

                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

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 out of 7
                • First post
                  1/7
                  Last post

                Got a burning SEO question?

                Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                Start my free trial


                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.

                • See all categories

                Related Questions

                • alstam

                  301 redirect from dynamic url to static page

                  Hi, i want to redirect from this old link http://www.g-store.gr/product_info.php?products_id=1735/ to this one https://www.g-store.gr/golf-toualetas.html I have done several attempts but with no result. I anyone can help i will appreciate. My website runs in an Apache server with cpanel. Thank you

                  Technical SEO | Dec 17, 2018, 4:22 AM | alstam
                  0
                • MJTrevens

                  Soft 404's on a 301 Redirect...Why?

                  So we launched a site about a month ago. Our old site had an extensive library of health content that went away with the relaunch. We redirected this entire section of the site to the new education materials, but we've yet to see this reflected in the index or in GWT. In fact, we're getting close to 500 soft 404's in GWT. Our development team confirmed for me that the 301 redirect is configured correctly. Is it just a waiting game at this point or is there something I might be missing? Any help is appreciated. Thanks!

                  Technical SEO | Jun 19, 2015, 5:37 PM | MJTrevens
                  0
                • ulefos

                  Remove html file extension and 301 redirects

                  Hi Recently I ask for some work done on my website from a company,  but I am not sure what they've done is right.
                  What I wanted was html file extensions to be removed like
                  /ash-logs.html to /ash-logs
                  also the index.html to www.timports.co.uk
                  I have done a crawl diagnostics and have duplicate page content and 32 page title duplicates. This is so doing my head in please help This is what is in the .htaccess file <ifmodule pagespeed_module="">ModPagespeed on
                  ModPagespeedEnableFilters extend_cache,combine_css, collapse_whitespace,move_css_to_head, remove_comments</ifmodule> <ifmodule mod_headers.c="">Header set Connection keep-alive</ifmodule> <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews</ifmodule> DirectoryIndex index.html RewriteEngine On 
                   # Rewrite valid requests on .html files  RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^ %{REQUEST_URI}.html?rw=1 [L,QSA] 
                   # Return 404 on direct requests against .html files RewriteCond %{REQUEST_URI} .html$  
                  RewriteCond %{QUERY_STRING} !rw=1 [NC]
                   RewriteRule ^ - [R=404] AddCharset UTF-8 .html # <filesmatch “.(js|css|html|htm|php|xml|swf|flv|ashx)$”="">#SetOutputFilter DEFLATE #</filesmatch> <ifmodule mod_expires.c="">ExpiresActive On
                  ExpiresByType image/gif "access plus 1 years"
                  ExpiresByType image/jpeg "access plus 1 years"
                  ExpiresByType image/png "access plus 1 years"
                  ExpiresByType image/x-icon "access plus 1 years"
                  ExpiresByType image/jpg "access plus 1 years"
                  ExpiresByType text/css "access 1 years"
                  ExpiresByType text/x-javascript "access 1 years"
                  ExpiresByType application/javascript "access 1 years"
                  ExpiresByType image/x-icon "access 1 years"</ifmodule> <files 403.shtml="">order allow,deny allow from all</files> redirect 301 /PRODUCTS http://www.timports.co.uk/kiln-dried-logs
                  redirect 301 /kindling_firewood.html http://www.timports.co.uk/kindling-firewood.html
                  redirect 301 /about_us.html http://www.timports.co.uk/about-us.html
                  redirect 301 /log_delivery.html http://www.timports.co.uk/log-delivery.html redirect 301 /oak_boards_delivery.html http://www.timports.co.uk/oak-boards-delivery.html
                  redirect 301 /un_edged_oak_boards.html http://www.timports.co.uk/un-edged-oak-boards.html
                  redirect 301 /wholesale_logs.html http://www.timports.co.uk/wholesale-logs.html redirect 301 /privacy_policy.html http://www.timports.co.uk/privacy-policy.html redirect 301 /payment_failed.html http://www.timports.co.uk/payment-failed.html redirect 301 /payment_info.html http://www.timports.co.uk/payment-info.html

                  Technical SEO | Apr 11, 2013, 10:03 AM | ulefos
                  1
                • Dan-Lawrence

                  Can you 301 redirect a page to an already existing/old page ?

                  If you delete a page (say a sub department/category page on an ecommerce store) should you 301 redirect its url to the nearest equivalent page still on the site or just delete and forget about it ? Generally should you try and 301 redirect any old pages your deleting if you can find suitable page with similar content to redirect to. Wont G consider it weird if you say a page has moved permenantly to such and such an address if that page/address existed before ? I presume its fine since say in the scenario of consolidating departments on your store you want to redirect the department page your going to delete to the existing pages/department you are consolidating old departments products into ?

                  Technical SEO | Nov 5, 2012, 1:05 PM | Dan-Lawrence
                  0
                • IM_Learner

                  301 Redirect on a PDF, DOCX files?

                  Hi, I have to rename many pdf and docx files. How can I implement 301 redirect on them as they are linked from 'n' number of places? Regards, Shailendra Sial

                  Technical SEO | Jul 31, 2012, 9:53 AM | IM_Learner
                  1
                • TrevorMcKendrick

                  301 Redirect with an Exact Domain name Match

                  My Client had a site that ranked for a pretty competitive two word phrase, but for a variety of reasons had to transfer the site to a different domain name (with none of the previous keywords). We've 301'd everything just fine to the new site, but our traffic for that two word phrase, as well as related long tail traffic, is beginning to drop. Could the drop be related to something that we didn't do well in the transfer? Or is it due to the new domain name now not being an exact match? Sitenote question: Our Google Analytics is still set up for the former domain name and shows data just fine. Is there any reason to switch GA to the new domain? What are the pros/cons? Much thanks in advance!

                  Technical SEO | Dec 7, 2011, 7:16 AM | TrevorMcKendrick
                  0
                • SamTurri

                  Any way around buying hosting for an old domain to 301 redirect to a new domain?

                  Howdy. I have just read this QA thread, so I think I have my answer. But I'm going to ask anyway! Basically DomainA.com is being retired, and DomainB.com is going to be launched. We're going to have to redirect numerous URLs from DomainA.com to DomainB.com. I think the way to go about this is to continue paying for hosting for DomainA.com, serving a .htaccess from that hosting account, and then hosting DomainB.com separately. Anybody know of a way to avoid paying for hosting a .htaccess file on DomainA.com? Thanks!

                  Technical SEO | Dec 7, 2011, 2:37 PM | SamTurri
                  0
                • Ant-808

                  How long will Google take to stop crawling an old URL once it has been 301 redirected

                  I need to do a clean-up old urls that have been redirected in sitemap and was wondering about this.

                  Technical SEO | Nov 4, 2011, 2:41 PM | Ant-808
                  0

                Get started with Moz Pro!

                Unlock the power of advanced SEO tools and data-driven insights.

                Start my free trial
                Products
                • Moz Pro
                • Moz Local
                • Moz API
                • Moz Data
                • STAT
                • Product Updates
                Moz Solutions
                • SMB Solutions
                • Agency Solutions
                • Enterprise Solutions
                Free SEO Tools
                • Domain Authority Checker
                • Link Explorer
                • Keyword Explorer
                • Competitive Research
                • Brand Authority Checker
                • Local Citation Checker
                • MozBar Extension
                • MozCast
                Resources
                • Blog
                • SEO Learning Center
                • Help Hub
                • Beginner's Guide to SEO
                • How-to Guides
                • Moz Academy
                • API Docs
                About Moz
                • About
                • Team
                • Careers
                • Contact
                Why Moz
                • Case Studies
                • Testimonials
                Get Involved
                • Become an Affiliate
                • MozCon
                • Webinars
                • Practical Marketer Series
                • MozPod
                Connect with us

                Contact the Help team

                Join our newsletter
                Moz logo
                © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy

                Looks like your connection to Moz was lost, please wait while we try to reconnect.