jtrash01
Regular Member
- Nov 5, 2013
- 271
- 127
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.
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:
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.
My doubt is, the last type of url's with appended ID, could have a negative impact in SEO ?
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
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:
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.
Code:
http://www.domain.com/video/unique-slug-from-video-title-178452
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: