eZ Community » Forums » Suggestions » Better URLs
expandshrink

Better URLs

Better URLs

Wednesday 08 November 2006 3:13:01 pm - 14 replies

I think the current way that ez creates URLs for nodes is a bit flawed, I suggest the following URLs for the future (If not possible already).

http://example.com/section/id-url_alias

The only difference is adding the id before the url alias, this will be used for looking up with page to display, it's faster for lookup, and if the url_alias changed, you wouldn't have broken links.

Monday 13 November 2006 2:11:30 am

If a URL alias changes (e.g. because the name of the node changes) ez automatically adds the old url to its internal list of forwarding url aliases. So the old url forwards to the new one - try it.

(Of course, if a new url is created in place of the old one, then that is displayed rather than forwarding to the new location.)

Regarding prepending the id to the url alias, I don't know of any way of doing this. Personally I don't see the current system as flawed, in that it enables the urls (important to search engine indexing etc) to be completely transparent of the internals of ezpublish. For me this is an extremely useful feature and not a flaw.

Matthew

Monday 13 November 2006 11:00:52 am

Hi,

The way it works is fine. For me, the needed improvements are:

1) Being able to define the max size of an url (apply a shorten to the name of an object). Some of my editors are more than verbose on the titles blunk.gif Emoticon

2) Deal with the children. Sometimes, an operation on a parent (either moving it, changing it's name...) work fine for the node, but screws the urls of the children and doesn't properly forward them.

X+

Monday 13 November 2006 12:28:29 pm

1) this one is simple, add short title to all classes, restrict it to ie: 18 charters and make it required. Remember to add it to name pattern like in the folder class: '<short_name|name>'

For those not familiar with name patterns, the one above means use short_name if present, else name.
Other patterns you can use: '<last_name>, <first_name>'

Tuesday 14 November 2006 3:21:30 pm

Hi André,

I knew about the dual attribute <a1|a2> (I've got a patch so it works too on webdav in you bug database for nearly a year, still unapplied blunk.gif Emoticon

My problem is that the users that put a title with a few hundred characters don't fill the short_title attribute (when you mess, you do it for real blunk.gif Emoticon.

The idea was to have a settings option in ez to set the maximum length allowed in each node level the url, so even if the title is way too long, then it shorten to a more sane length.

X+

Wednesday 15 November 2006 2:01:08 pm

I guess I didn't explain the idea well.

The idea when you have a unique ID in the URL for the object that needs to be displayed many advantages are gained:

1- You never need to worry about the way the system looks up the object from the URL. Only the numeric part is needed, whatever comes after it is just for SEO

2- If the URL changes, this is no problem, and the system doesn't need to keep track of the older URL. The system actually doesn't need to keep track of any URL. Because the URL holds a unique resource that can be located without the need to keep a table of valid URLs

3- This is a major performance gain

4- I heard search engines give better ranking for pages that contain a unique ID in the URL, I'm not sure, but I heard google works like that, I even emailed them once and this is what they said.

Wednesday 15 November 2006 5:15:29 pm

You were clear and some CMS systems use a mostly similar system.

1- You never need to worry about the way the system looks up the object from the URL. Only the numeric part is needed, whatever comes after it is just for SEO

I don't worry anyway about how the system looks up the object. I start worrying if it doesn't find it blunk.gif Emoticon

2- If the URL changes, this is no problem, and the system doesn't need to keep track of the older URL. The system actually doesn't need to keep track of any URL. Because the URL holds a unique resource that can be located without the need to keep a table of valid URLs

Yes, but the system is able to keep track. If not, it should be fixed.

3- This is a major performance gain

Have you looked the code ? I don't think this affirmation is valid.

4- I heard search engines give better ranking for pages that contain a unique ID in the URL, I'm not sure, but I heard google works like that, I even emailed them once and this is what they said.

I'm not aware of such a ranking impact. Could you post the reply you got ? The only case I'm aware of is that it was mandatory to have numbers on the urls to be into google news, but I think they've changed that.

X+

Thursday 16 November 2006 7:53:06 am

I dont need to look at the code to conclude that a lookup on a a unique indexed integer is faster than a string happy.gif Emoticon

Thursday 16 November 2006 5:56:31 pm

I agree they might be a few ms of difference. I'd say that give the time it spends on other things, that's negligeable.

Still, it would be nice to be able to customise how the fetch of a content/ generation of the nice_url is done. You might submit a suggestion in the bug report tool ?

X+

Friday 18 July 2008 9:39:56 am

One of our customers claims that:

1) Having links as long as the ones produced by eZ Publish may not be good for SEO (google in particular), they expect Ammar's method suggestion to have a better chance of getting "up there" (identifier + some seo text, not necessarily structure related).

No questions here, and I think Ammar may be right about performance gains.

2) In structure-reflecting URLs (like those in eZ), from SEO point of view it would be much better to have a reversed alias order. For example, instead of:

domain.com/company/people/john

having:

domain.com/john/people/company

They say it was tested (not with eZ) and seems to give better results. By the way, they do realize flaws of such approach as well.

What are your experiences with those issues?
Do your clients complain in any way about URL system in eZ Publish, especially about URL lenghts?
And do you think this reversed order could actually be of any value?

Thanks,
Piotrek

Tuesday 03 February 2009 4:00:13 pm

From my side, I would suggest being able to setup nice urls on shared, php-cgi host without using virtual host. It just cannot be done right, if not 403 then it gives 500 errors... or just redirects any address mydomain.com/site/sth to index.php, which gives error "module cannot be found". No matter what advice from this site I take and what htaccess I use, it's still the same.

I just cannot modify httpd.conf. Some people claim that they removed index.php without vhost and using only htaccess. I wonder what their php settings are. Do you have any information about it?

Friday 20 March 2009 11:19:57 pm

the <att1|att2> trick being neat, the most flexible option would be to allow the url translator to accept a few extra modifiers, such as eg.

<att1|shorten(25)>

It still would be a chore to do that for every content class, but still better than having to set up the <att2|att1> trick or a custom event handler that copies the standard title into the short_title...

...but after all probably the simplest way is to set up a php class that implements the eZURLAliasFilter interface? Look it up in kernel/classes and in site.ini

Tuesday 24 March 2009 11:37:56 am

Hi Ammar,

I have to disagree with you happy.gif Emoticon

Here's a short SEO example:

http://www.example.com/Pragerank5/Pagerank4/Pagerank3

adding two slashes here would affect that google indicates that the content of the site is two levels deeper in the content structure than it really is.

This is one of the mayor benefits compared to other WCMS systems.

Instead for SEO I would like to reduce the maximum amount of slashes whithin the URL link:

http://www.example.com/Level1/Level2-Level3-Level4

Friday 10 April 2009 12:09:19 am

i'm quite agree with Norman here. Some of our customers claims about the "folder names" in the urls. I mean. if they have

News
     Sports
         Basketball
              Nba
                   Lakers won yesterday
             Euroleague
                   Barça will be at the Final Four

default url system will produce an url like /news/sports/basketball/nba/lakers-win-yesterday
and /news/sports/basketball/euroleague/barca-will-be-at-the-final-four

Some customers ask us to delete all the "folders" from the url, to produce urls like /lakers-won-yesterday and /barca-will-be-at-the-final-four.

They say is better for SEO that the title of the articles will be just after the domain... I'm not a SEO expert, but do you think that urls can be configured this way?.
Thank you.

Monday 24 August 2009 9:18:44 pm

google has change and now indexes dynamic urls where in the past, it'd strip anything after a ? that was in a url. so as ez_pub currently exists, it's not SEO.

one of the google gurus has a blog...his name is matt something. there's a vid on his site that explains all of this and is pretty informative.

in general / and - are best in a url. where _ will be indexed, it's best to stick with -.

anyone achieved SEO with htaccess?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from