1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about Unique Slugs and SEO Friendliness

Discussion in 'White Hat SEO' started by jtrash01, Jan 1, 2017.

  1. jtrash01

    jtrash01 Regular Member

    Joined:
    Nov 5, 2013
    Messages:
    270
    Likes Received:
    119
    Location:
    BARCELONA, SPAIN
    TL;DR is in Blue, below...

    I started writing my own adult tube site and I'm still planning how things should be. Things like permalink url's to the videos making use of slugs generated from title.
    Code:
    http://www.domain.com/video/slug-from-video-title
    The thing is that all "my" content (videos and their metadata) will be scrapped. And this way some titles will be duplicated, but the slugs can't be duplicated since them must uniquely identify a video.

    So I have two alternatives:
    • A) Force my table to have unique titles and discard videos with non-unique fields. This has pros/cons. Pros are that url's would be cleaner. Cons are that all videos with equal titles would be discarted.
    Code:
    http://www.domain.com/video/one-unique-slug-from-video-title
    http://www.domain.com/video/another-unique-slug-from-video-title
    • B) To append a number to the slug to make it unique if duplicates are found:
    Code:
    http://www.domain.com/video/slug-from-video-title-1
    http://www.domain.com/video/slug-from-video-title-2
    But this implies that I'll have to query the database for every time I want to insert/create a new video to check if the title were duplicated, if so, then append a number and insert it into the database. And if I need to insert thousands, this could definitely has impact in the database in time/resource usage doing full table lookups for every insert.​

    Another approach to this is to take the LAST_INSERT_ID() + 1 to know the ID of the next insert in the database, and then append that ID to the Slug. So If a video will get the ID 178452 when it gets inserted the resultant url would be something like this:
    Code:
    http://www.domain.com/video/unique-slug-from-video-title-178452
    This approach would let me scrape videos and their metadata, and insert them in one stroke without querying every time the database to check for duplicates...
    It's the same of A, but including the videos with duplicate titles but with unique slugs.​

    My doubt is, the last type of url's with appended ID, could have a negative impact in SEO ?
    Code:
    http://www.domain.com/video/unique-slug-from-video-title-178452
    http://www.domain.com/video/another-unique-slug-from-video-title-32845
     
    Last edited: Jan 1, 2017
  2. validseo

    validseo Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 17, 2013
    Messages:
    917
    Likes Received:
    527
    Occupation:
    Professional SEO
    Location:
    Seattle, Wa
    I would try to avoid option B. Google doesn't like results in the SERPs to look too similar. You are just going to get more of your content filtered with this approach. You should use a manual Queue for new content that comes up for existing slugs, titles, or descriptions. You could make a simple app to re-slug entries in this queue. Then you have a cool tool for targeting search terms you would otherwise miss.