I want to mention some factors that may help better decide what you need and be comfortable with it.
When I started my website I had same kind of dilemma (you want everything to be ideally organized), so now I'll explain how my taste changed toward this:
First I liked the idea to split different subjects on subdomains like:
- music.site.com etc..
but somehow there may be some trouble managing subdomains (especially when using shared-hosting, they not always let you manage this kind of things as you wish), also subdomains have different system of ranking. Moving website also may have some troubles etc..
Having directory structure is nice, I used this too and I love it, but some says that you should not go too deep with it and it's better to have 2 or max 3 branches (for readability, for seo and just to be flexible).
Having extensions is redundant like:
.html. I started with
.htm because I liked that idea, every page was able to download pdf and doc versions and in my url I would just change extension for different that purpose:
like that, I liked that first time but next I thought it was redundant for
.htm and would make url a bit less readable. but it's matter of taste.
Finally I prefered: site.com/poets/poems/dsa-poem-name
dsa I created number masking tool with letters using all the latin alphabet symbols, doing is good for some reason, even long ids look smaller in size. I mean having ids in url is good for some reason: if you somehow misspell the words in your url you can change later and do 301 redirects by depending on id, for example:
- if u had ../dsa-poem-neme and change later with ../dsa-poem-name the url ../dsa-poem-neme will still work by redirecting to correct form, and you identify entry by converting
dsa in number ex: 13412, and check if urls does not match redirect to correct one, without showing the 404 (this case you don't lose users visiting old version of incorrect urls).
most use ids itself but it does not look nice for eyes with my opinion, and letter better fit in.
So finally I recommend to do:
- folder structure, with 2 or 3 max branches
- having identifier in url (at the beginning or at the end of it)
- don't use redundant fake file extensions like:
- extra tip: don't allow slashes at the end of url like: ../dsa-poem-name/, it's more beautiful without it.