Personally i wouldnt have either but if you have to then id go for the /23
I'm working on a new PHP site and have reached the point of setting up my routes and I was hoping you might give me your thoughts on my URL structure options in respect of SEO.
Naturally I am including the post slug, but feel that I should include the ID in there too, but I'm not sure which option would be best. I could have;
domain.com/23/page-slug
or
domain.com/23:page-slug
Of course the other option is to remove the ID (23) altogether, but I'm worried about the longevity of this approach as there is a reasonable possibility of two pages having the same title.
I'd love to hear your thoughts as to whether /23/ or /23: is best.
Cheers.
Last edited by bendybooks; 26-04-09 at 06:13 PM. Reason: Needed to disable smilies
Personally i wouldnt have either but if you have to then id go for the /23
My advice would be to keep your structure as flat as possible. If you want to include the ID then try something like /page-name-23/ or /page-name-23.html - do not insert unnecessary levels!
I did have concerns regarding the colon, so it's good to see I'm not alone. Saying that, one of the reasons for thinking of the colon was to keep the levels more flat. Still, looks like it's worth leaving alone.
Regarding the ID, I agree that's it's best not to include them, but it does worry me for the long term and I don't know how else to deal with pages that would have duplicate slugs; so I'm left with including an ID.
I'm not sure how using a hyphen will affect my routes as the page-slug itself uses hyphens to separate the words. I'm guessing it would be better to pre- rather than appended to the slug;
/23-page-name-slug
with luck this will make the routes easier to handle.
Thanks for your advice.
AFAIK, the only valid use of a colon in a URL is to separate a port number from the rest of the URL. There are a few CMS systems out there that use them too, but just because they don't break things doesn't make their use good practice
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks