The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Link Building
    4. PHP Redirection better than Nofollow?

    PHP Redirection better than Nofollow?

    Link Building
    6 3 1.3k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BloggerGuy
      BloggerGuy last edited by

      Hello, if I have affiliate outbound links in my blogs, what's better in terms of SEO, to use PHP Redirection or Nofollow for those links?

      For example, instead of using nofollow for the outbound affiliate links, I can use some plugin for WordPress that does this:

      mydomain.com/affiliatesitename1 -> redirects to the affiliate link1.

      mydomain.com/affiliatesitename2 -> redirects to the affiliate link2.

      mydomain.com/affiliatesitename3 -> redirects to the affiliate link3.

      Is this better?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • FedeEinhorn
        FedeEinhorn last edited by

        Both will actually have the same effect as long as you nofollow your affiliate links directly or the PHP script that does the redirection is disallowed via the robots.txt + makes a 302 redirect.

        The downside of using nofollow is that you can't track the hits on those links from your end, but with PHP you can save that into a DB or any file.

        Hope that helps!

        1 Reply Last reply Reply Quote 1
        • customerparadigm.com
          customerparadigm.com last edited by

          My hunch is that if you use the method you just outlined, where:
          mydomain.com/affiliatesitename1 -> redirects to the affiliate link1

          ... you are essentially creating the equivalent of a followed, 301 redirect from your site to their site, and passing along link value as a result.  It would appear to me that this would be a followed link.  Depending on the number of redirects, a percentage of the link value may be lost as a result.  But if that is what you would like to do, then go ahead and do so.

          But a better practice would be to no-follow those links, as they are outbound affiliate links.

          Hope this makes sense?
          Thanks,
          Jeff

          FedeEinhorn 1 Reply Last reply Reply Quote 1
          • FedeEinhorn
            FedeEinhorn @customerparadigm.com last edited by

            Hey Jeff, probably if there's a plugin designed to specifically redirect affiliate links I bet it already does a 302 redirect while suggesting to add the disallow in the robots.txt (or even adding itself).

            1 Reply Last reply Reply Quote 3
            • customerparadigm.com
              customerparadigm.com last edited by

              Federico - Sure... if it does that as part of the plugin, then it should be good to go... 🙂

              1 Reply Last reply Reply Quote 0
              • BloggerGuy
                BloggerGuy last edited by

                Excellent points and advice, thanks everyone for answering.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Is it better to have micro-sites with good content or redirect domains?
                  BasKierkels
                  BasKierkels
                  0
                  4
                  95

                • MOZ indicates 404 page and 0 backlinks, after 301 redirect. The best redirect solution?
                  Chemometec
                  Chemometec
                  0
                  7
                  300

                • Redirect
                  Nobody1560986989723
                  Nobody1560986989723
                  0
                  6
                  105

                • Follow or Nofollow?
                  irvingw
                  irvingw
                  0
                  2
                  135

                • Automatic Redirect
                  VillasDiani
                  VillasDiani
                  0
                  9
                  157

                • Do I get any link juice from a PHP header redirect from another site?
                  David_Viciedo
                  David_Viciedo
                  0
                  3
                  458

                • What link would be better?
                  THB
                  THB
                  0
                  7
                  746

                • Redirecting
                  wildnerakademie
                  wildnerakademie
                  0
                  8
                  825

                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
                • Digital Marketers
                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 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy