What is a reasonable field size for a "Slug" (e.g. www.MySite.com/articles/[b]why-incorporating-your-business-makes-sense[/b])
Right now, I have a VARCHAR(100) chosen.
VARCHAR(255) is exactly the same as VARCHAR(100) except that it will hold a larger value
for some columns, where you anticipate a chance of needing to store a value larger than 255 characters, you might want to choose TEXT instead (this is handled differently internally than a VARCHAR)
but slug isn't one of them
Except that a VARCHAR(255) allows up to 255 characters... gasp And I don't want slugs to be that long. (Would you?!)
I am thinking that if you can't say it in 100 characters then you need to re-think things. But that is just me?!
that sounds fine
make sure you add code to test the length of any proposed slug, and issue a user-friendly message instead of just storing the data into VARCHAR9100) because it'll get truncated and you might not notice
Yep, I had the same idea earlier today.
Okay, sounds good.
This may sound like a funny question, but does Google have a limit on the length of what we are calling a "slug"?
By that, I mean does Google maybe ignore the part of the slug over a certain number of characters when indexing and what-not?!
So, if my slug was...
...but Google chopped things off after 25 character, the to Google, it would be...
(And, hey, who doesn't?!) :rofl: :angel5:
i don't think google knows what a slug is, so why would google truncate it?
One of the key reasons for creating slugs is that Search Engines are supposed to like them.
I don't know how, but Google certainly uses the URL - especially the slug - to index things.
So, if Google had a limit of 25 characters, then it would index
instead of indexing...
And it might think my website or at least the web page in question about a topic entirely different than what it actually is about.
The logic is the same as what would happen if your Title or Description got chopped off.
If your Title read...
This is a really really awesome web page that is many focus on dealing with CSS Tips
...then you would get indexed the same as if you had a title of...
CSS Tips & Tricks
i understand that search engines know what urls are
i don't think they know what slugs are
This topic is now archived. It is frozen and cannot be changed in any way.