SitePoint Sponsor

User Tag List

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

    Do I dare change the URL format in my Google sitemap?

    I currently use the following format in my sitemap:

    oil-testimonials.com/essential-oils/7638


    But to help with SEO, I now use this format to get to the same testimonial:


    oil-testimonials.com/essential-oils/7638/say-goodbye-to-mosquitoes-while-4-wheeling



    My sitemap uses PHP and is dynamic, so it would be very easy for me to change the code so the sitemap produces URLs with the new format. But google may see this as a whole new URL, and throw away the "link juice" that my URLs have built up in the last 8 years.

    I use mod_rewrite in my .htaccess file so that people who attempt to visit the old URL format get redirected with a 301 to the new format. When that scenario happens, I also tell the landing page to use the canonical URL. However, if I change the format of the URLs in the sitemap, there really is no way to do a 301 redirect. Should I leave the old URL format in my sitemap or change it to the new format? Any suggestions would be greatly appreciated!


    Last edited by TechnoBear; Aug 22, 2012 at 02:06. Reason: URLs delinkified
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    SitePoint Addict
    Join Date
    Dec 2000
    Location
    Orange County, Ca
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The first URL -http://www.oil-testimonials.com/essential-oils/7638 currently redirects to the second URL - http://www.oil-testimonials.com/essential-oils/7638/say-goodbye-to-mosquitoes-while-4-wheeling so Google already knows about both URLs and sees them as 1 rather than 2 separate ones.

    I believe Google prefers to not have URLS in a sitemap that redirect, they prefer to have URLs that are not redirected.

    I do not think there should be any issues with changing the format, but you never know until you test. Usually Google will give an error message in Webmaster Central if you have URLs in a sitemap that are redirecting. Have you received any of these error messages? If you have then you will need to change the format.
    Last edited by TechnoBear; Aug 22, 2012 at 02:06. Reason: URLs delinkified
    Wordpress Auto Installer
    www.webproco.com

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,883
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    @busboy



    My sitemap uses PHP and is dynamic...
    While you are in the process of updating your URL's why not dispense with the meaningless numeric reference completely and extract the URL keywords. Your internal search would then display the relevant page if an exact keyword match is found, present a list of near matches or a suggestion page?

    Your original numeric search would still be valid but show the new SEO friendly canonical page.
    Last edited by John_Betong; Aug 21, 2012 at 23:24. Reason: spelling: not my fortay
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  4. #4
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    865
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    John, I'm a bit confused by what you suggested. It's bad to have a number in the URL that points the entry in the database? What I really need help with is knowing if I should change the format of the URLs in my sitemap when there is no way to do a 301 redirect. Thanks.
    Convert your dollars into silver coins. www.convert2silver.com

  5. #5
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,883
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by busboy View Post
    John, I'm a bit confused by what you suggested. It's bad to have a number in the URL that points the entry in the database? What I really need help with is knowing if I should change the format of the URLs in my sitemap when there is no way to do a 301 redirect. Thanks.

    From your original post you mentioned that the:

    OLD-URL:
    oil-testimonials.com/essential-oils/7638

    NEW-Canonical-URL:
    oil-testimonials.com/essential-oils/7638/say-goodbye-to-mosquitoes-while-4-wheeling

    I believe a Sitemap.xml is crawled and all new updates are added to the current crawler database. Their search engine database is then used to pick out exact or near matches to present a list of found items.

    I noticed that in your sitemap.xml there is no reference to the NEW-Canonical-URL? I could be very wrong by assuming that it would be far better in your sitemap.xml to remove the OLD-URL and replace with the NEW-Canonical-URL.

    The logic behind this is that any crawler going to your OLD-URL will be 301'd and update their database with your NEW-Canonical-URL. Also all OLD-URL's (from any source) will be redirected by the .htaccess file.

    @revium appears to agree
    >>> I believe Google prefers to not have URLS in a sitemap that redirect,
    >>> they prefer to have URLs that are not redirected.



    <hr />


    I do not know what "dynamic PHP software" you are using but it would help posters with future recommendations.

    I also assume you have a database of posts with the following format:
    table->id
    table->title
    table->blurb

    If the above popular structure is similar to yours then I can give further information about how I have a PHP search function:

    1. if URL keyword has a number (within range of table->id) RESULT: table->title, table->blurb
    2. if URL has string then search table->title, exact match RESULT: table->title, table->blurb
    3. parse URL keywords and search table->title and table->blurb RESULT: all matched table->title
    4. RESULT: 404 page showing keywords not found and possible solutions.

    Adapting the above function to your own specific requirements will cater for a numeric reference to a NEW-Canonical-URL.


    <hr />

    Nearly forgot.
    >>> It's bad to have a number in the URL that points the entry in the database?
    As far as the crawler is concerned then the numeric is confusing and cannot be referenced.
    Is your four digit number decimal, octal, hexadecimal or something else?
    Last edited by John_Betong; Aug 24, 2012 at 19:02. Reason: spellling: not my fortay
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014


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
  •