Skip to content

Global URL building options

All options described on that page apply globally, they will be used for all SEF URLs created by 4SEF.

Enabling 4SEF

A screenshot of 4SEF main URL on/off switch

This option is a global on/off switch. When set to No, 4SEF has strictly no effect on your site and does nothing.

URLs on the site will change

As soon as 4SEF is enabled, it will generate URLs that are normally different from those coming from Joomla. That's one of the main feature of 4SEF but you have to be aware of the change and take appropriate actions before enabling it.

On new sites, or sites that are not yet well indexed by search engines, this does not matter and no action is necessary.

Otherwise, this usually involves adding redirects if you were using regular Joomla SEF URLs before starting to use 4SEF and the site is indexed by search engines already.

An alternative, especially if the website has few pages, is to manually customize the most commonly used URLs so that they are identical to the Joomla ones.

Url segments processing

This section groups multiple options related to how URL text should be transformed

Whenever an item alias or title is used to build a URL, the transformation described in the input fields in that section are applied to that text.

Please refer to each input field to understand their effect.

In most cases, these should not be modified.

A screenshot of 4SEF options to process URLs segments

A screenshot of 4SEF options on how to use menu items in URLs

4SEF normally does not use menu items when creating URLs but this is still sometimes necessary, for instance for some 3rd-party extensions.

When this happens, and this option is enabled, the menu item alias will be used to build the URL, while if disabled, the menu item title is used.

URL suffix

A screenshot of 4SEF possible suffixes to append to URLs

A fixed suffix, such as .html, .htm or .php. The suffix you enter here will be added to SEF URLs exactly as is.

  • In some cases, the suffix will actually not be added. For instance, for Joomla content, the suffix is added to individual articles urls but not to category URLs
  • Joomla global configuration has an Add suffix to URL option. 4SEF does not use that option. The Joomla suffix can only be .html while the 4SEF one can be anything.

On Joomla! 3, if you use any other suffix than .html, you must set Joomla own Add suffix to URL setting to No in Joomla's global configuration. This is not needed on Joomla 4+.

Category feeds

On rare occassions, you may need to make 4SEF create RSS and Atom feeds for categories to use a different, safer type of URLs. By default, RSS/Atom feeds are created using the same URL as the category itself, with the addition of a /feed/ segment:

/example-category/feed/rss/

If you manually customize the categtory URL, for instance by appending a suffix to it, the resulting feed URL will not work. In such case, enable this setting and the feeds URLs will become:

/example-category/?format=feed&type=rss

Such URL should work in all cases.

You do not need to Purge or delete existing URLs for this setting to take effect.

sh404SEF shURLs

sh404SEF is a discontinued extension with which 4SEF tries to maintain backward compatibility when possible. sh404SEF had the ability to create shURLs, or "short URLs", which was a native, built-in URL shortener.

For most pages of the site, it would create a really short URL such as https://www.example.com/ab. When a visitor tried to load the /ab page, they were then rediercted to the original URL.

4SEF does not have that feature, so no new short URL can be created automatically, but it can still read the shURLs created by sh404SEF and execute them, in order to avoid broken links when moving from sh404SEF to 4SEF.

You can manually create such short links by using 4SEO aliases.

You only need to do this if you actively used shURLs in sh404SEF. For instance, you used shURLs to be printed on your business cards, or in ads, to share pages on social networks or through emailing campaigns.

Most users should not be concerned with enabling legacy shURLs support in 4SEF.

To have 4SEF execute sh404SEF shURLs, the following must happen:

Copy over the sh404SEF shURLs

4SEF will try to read existing sh404SEF shURLs from the {prefix}_forsef_pageids database table. You have 2 options to fill this database table with sh404SEF shURLs:

  1. Rename {prefix}_sh404sef_pageids into {prefix}_forsef_pageids. This requires that you first delete the existing {prefix}_forsef_pageids table.
  2. Using phpmyadmin or a similar database tool, copy the content from sh404SEF own database table, {prefix}_sh404sef_pageids into {prefix}_forsef_pageids

{prefix} is the prefix added by Joomla at the start of all table names in your database. It's unique for your website and never changes. For instance, the 4SEF table name will be similar to: qnhf6_forsef_pageids.

Enable the legacy feature

Simply Enable Execute legacy sh404SEF shURLs under Configuration | URLs

Once you have the right database content and you enable the feature, legacy shURLs from sh404SEF should redirect to their counterpart automatically.