A short tip showing you the best way to link directly to Joomla articles when using SEF URLs (search engine friendly URLs).
Using SEF URLs on your Joomla site is very useful. You can use the built-in Joomla SEF functions. For more control you can use the popular sh404SEF component.
Using SEF URLs is also recommended for SEO purposes and to make it easier for users to see if the page is relevant or not. For instance, sending a link by email doesn't make much sense to the receiver when it looks like this (Joomla URL):
The URL makes more sense when it looks like this (SEF URL):
Which URL should you link to?
That depends on where you put your link. If you link to the article from another website, or want to send a link to someone, use the SEF URL. It makes sense, and for me that's the only viable choice. The URL is readable and tells the user what she can expect to find when clicking.
However, when linking within a Joomla website, use the Joomla URLs. The reason is simple. For some reason, you might decide to change the SEF URLs. If you have used the SEF URL for internal links, you will have problems. You will end up in a lot of broken links. To avioid this scenario, use the Joomla URL when linking.
The easiest way to link to an article in Joomla is to use Linkr or the Advanced Link Component in JCE, the advanced text editor for Joomla. With this component you can browse to the menu item or content item you want to link to. I find this very easy to use. And it will give you the Joomla link to the content, not the SEF URL.
But won't this be bad for the users and create duplicate links in search engines?
No, it won't. Simply because Joomla (or sh404SEF) will 'translate' the URL to SEF URLs on the fly when rendering the page.
This is what the JCE Advanced Link plug-in looks like: