Forums / Suggestions / Better URLs

Better URLs

Author Message

Ammar Ibrahim

Wednesday 08 November 2006 6:13:01 am

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.

Matthew Carroll

Sunday 12 November 2006 5:11:30 pm

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

http://carroll.org.uk

Xavier Dutoit

Monday 13 November 2006 2: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 ;)

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+

http://www.sydesy.com

André R.

Monday 13 November 2006 3:28:29 am

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>'

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Xavier Dutoit

Tuesday 14 November 2006 6:21:30 am

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 ;)

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 ;).

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+

http://www.sydesy.com

Ammar Ibrahim

Wednesday 15 November 2006 5:01:08 am

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.

Xavier Dutoit

Wednesday 15 November 2006 8:15:29 am

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 ;)

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+

http://www.sydesy.com

Ammar Ibrahim

Wednesday 15 November 2006 10:53:06 pm

I dont need to look at the code to conclude that a lookup on a a unique indexed integer is faster than a string :)

Xavier Dutoit

Thursday 16 November 2006 8:56:31 am

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+

http://www.sydesy.com

Piotrek Karaś

Friday 18 July 2008 12: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

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Noicokuna Niemoge

Tuesday 03 February 2009 7:00:13 am

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?

Shiki soku ze ku...

Gaetano Giunta

Friday 20 March 2009 3: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

Principal Consultant International Business
Member of the Community Project Board

Norman Leutner

Tuesday 24 March 2009 3:37:56 am

Hi Ammar,

I have to disagree with you :)

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

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Carlos Revillo

Thursday 09 April 2009 3:09:19 pm

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.

cubby cub

Monday 24 August 2009 12: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?

Aang: Just like the legend says, we let love lead the way.