SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Delicate balance between pretty URLs and maintaining SEO link juice

    When a user conducts a keyword search and finds a testimonial they want to read the URL looks like this:

    oil-testimonials.com/essential-oils/7517

    If the website emails a user stating that a new testimonial has been posted that matches one of their searches, the format looks like this:

    oil-testimonials.com/essential-oils.php?tID=7517&sID=126648

    When a registered chooses to use our forwarding feature to send the testimonial to a friend the URL looks like this:

    oil-testimonials.com/essential-oils.php?tID=7517&rID=23289

    So each of these URLs will technically pull up the same testimonial. It's just that different code is processed depending if the person arrived on the page via a keyword search, match notification email, or referral email. The problem is, as far as I know, Facebook and Google treat each of these URLs as separate pages. So the total of Facebook likes for this particular testimonial won't accrue correctly. Nor will I help my SEO efforts.

    My goal is to start using pretty URLs, like the following, to increase SEO link juice:

    oil-testimonials.com/essential-oils/7517/an-itchy-red-tick-bite

    I have a plan to make this work, but wanted to run this past the experts here on this form. It involves creating a new router.php page. So the new process would be:

    1. A user gets an email letting them know a new testimonial has been posted. The link in the email would use the new format of: oil-testimonials.com/router.php?tID=7517&sID=126648

    2. This router.php page would grab the tID and sID from the URL and store it in the session.

    3. The router.php page would then redirect the user to the pretty URL format: oil-testimonials.com/essential-oils/7517/an-itchy-red-tick-bite This way the URL in the address bar will always be the same, no matter how the user lands on the page. Google and Facebook will no longer see different URLs that point to the same page. The essential-oils.php page would just need to be changed to look for the tID, sID or rID variables in the session, as opposed to the URL.

    Is this a good idea? Or is there a much better way?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    bb,

    To me, the error is in providing multiple URIs to the same location (which should and DOES incur a penalty from SE's). Fix that and you won't have a problem. There is no excuse for your e-mail script to not reformat the link nor for your testimonials to do so either.

    Yes, you can easily "fix" this crazy mix with mod_rewrite (you don't need the power of a PHP script) but I'd ask WHY? Do it right the first time and you don't need to worry about the ill effects of multiple links.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by busboy View Post
    When a user conducts a keyword search and finds a testimonial they want to read the URL looks like this:

    oil-testimonials.com/essential-oils/7517

    If the website emails a user stating that a new testimonial has been posted that matches one of their searches, the format looks like this:

    oil-testimonials.com/essential-oils.php?tID=7517&sID=126648

    When a registered chooses to use our forwarding feature to send the testimonial to a friend the URL looks like this:

    oil-testimonials.com/essential-oils.php?tID=7517&rID=23289

    So each of these URLs will technically pull up the same testimonial. It's just that different code is processed depending if the person arrived on the page via a keyword search, match notification email, or referral email. The problem is, as far as I know, Facebook and Google treat each of these URLs as separate pages. So the total of Facebook likes for this particular testimonial won't accrue correctly. Nor will I help my SEO efforts.

    My goal is to start using pretty URLs, like the following, to increase SEO link juice:

    oil-testimonials.com/essential-oils/7517/an-itchy-red-tick-bite
    I can think of easier ways of doing it, but I'm not a PHP guy so I don't know how sensible it is...

    You can solve the problem of Google seeing multiple URLs with the canonical tag. Choose the URL that you want Google to index, and put the in the <head> a line like:
    Code:
    <link rel="canonical" href="http://oil-testimonials.com/essential-oils/7517/an-itchy-red-tick-bite">
    and that tells Google that, whatever URL it found that page it, you want it to index it under the one you've given. (You can use this if there are slight variations as well, so if people from one referrer get a slightly different version of the page it won't matter or hurt your ranking.)

    While you can construct the URL in a different way for different referrers, it's even easier (and more intuitive for users) if you just pop a query on the end, eg oil-testimonials.com/essential-oils/7517/?ref=forward23289.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •