How ILIAS Builds URLs and Why SEO Problems Appear
ILIAS does not behave like a typical content management system that maps a clean slug to a single page. It is a learning platform built around repository objects, each identified by a numeric reference ID (ref_id). A course, category, forum, or file is reached through a dispatcher script such as ilias.php or goto.php, and the real target lives inside the query string. A raw link therefore looks like https://example.com/ilias.php?ref_id=42&cmd=view&cmdClass=ilrepositorygui. Search engines can crawl these, but the long parameter chains produce duplicate-looking pages, weak canonical signals, and poor click-through from results.
To soften this, ILIAS ships a permanent link system based on goto.php. A course with ref_id 42 of type crs is addressed as https://example.com/goto.php?target=crs_42, and when the rewrite engine is active, as the much shorter https://example.com/goto_yourclient_crs_42.html. That shortened form is the closest thing ILIAS offers to a friendly URL, and it is the version you want shared externally and picked up by crawlers. The problem on shared hosting is that this short form only resolves when the correct rewrite rules exist in .htaccess and when the ILIAS client configuration knows its own installation ID and base URL. If either side is misconfigured, the pretty links return 404s while the ugly query-string links keep working, which is the most common complaint.
A second layer of trouble comes from host and scheme inconsistency. ILIAS stores an absolute base path in its client settings. When that stored value is http:// or a bare domain while visitors arrive on https://www., every generated permanent link and every internal asset reference points at the wrong canonical host. The result is mixed canonical signals, redirect chains, and occasional session loss because ILIAS is strict about matching the configured host. All of this is fixable from an unprivileged hosting account, because the moving parts are the document root .htaccess, the ILIAS setup configuration, and a small amount of PHP runtime tuning through .user.ini.
Enabling Permanent Link Rewrites in .htaccess
ILIAS needs mod_rewrite-style handling to turn goto_client_crs_42.html into a request against goto.php. LiteSpeed on AlmaLinux reads and honours standard .htaccess rewrite syntax, so you configure everything through File Manager without touching server config. Open DirectAdmin, go to File Manager, and navigate to the ILIAS document root (commonly /domains/example.com/public_html or a subfolder such as /public_html/ilias if you installed it in a directory). Edit the existing .htaccess or create one, and confirm the rewrite block is present:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# ILIAS pretty permanent links (goto)
RewriteRule ^goto_[^/]+_([a-z0-9]+)_([0-9]+)\.html$ goto.php?target=$1_$2 [QSA,L]
# Shorter legacy form used by some installs
RewriteRule ^goto_([a-z0-9]+)_([0-9]+)\.html$ goto.php?target=$1_$2 [QSA,L]
</IfModule>If ILIAS lives in a subdirectory, set RewriteBase /ilias/ and place the .htaccess inside that subdirectory. The [client] segment in a real permanent link is your ILIAS client ID, which you can read under the setup, so a link for client default becomes goto_default_crs_42.html. The first rule above handles that named form; the second covers installs that omit the client ID. After saving, test one link directly in the browser. If it still 404s, the rule is not being evaluated, usually because an earlier RewriteRule in the same file is catching the request with an [L] flag before it reaches the ILIAS rules. Move the ILIAS block above any broad catch-all rules.
Permanent links must also be switched on inside ILIAS. Log into the platform as an administrator and open Administration → General Settings → Permanent Links. Confirm that permanent links are enabled and that the short HTML form is selected rather than the raw query-string form. This setting controls what ILIAS prints in the sharing box and in notification emails, so turning it on is what actually makes the clean links appear to users.
Fixing the Canonical Host, HTTPS and Redirect Behaviour
Before you force any redirects at the web server layer, align the base URL that ILIAS stores internally. Browse to your ILIAS setup, typically https://example.com/setup/setup.php, authenticate, and open the client configuration. The HTTP path or base URL field must exactly match the public address visitors use, including scheme and the www or non-www choice. If users reach https://www.example.com but ILIAS stores http://example.com, correct it to https://www.example.com and save. This single field controls how every permanent link and absolute asset URL is generated, so fixing it removes most mixed-canonical and session-drop issues at the source.
With ILIAS pointing at the canonical host, enforce the same choice at the edge so that search engines consolidate signals to one address. Add a host and scheme normaliser near the top of the document-root .htaccess, above the ILIAS rewrite block:
# Force HTTPS and a single canonical host
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]Pick either the www or the bare domain and keep ILIAS, this rule, and any sitemap entries on the same decision. A frequent failure here is a redirect loop: it happens when the .htaccess forces HTTPS but the hosting account terminates SSL at a proxy and passes HTTP to the application. On Hostiso LiteSpeed accounts, test by checking the HTTPS variable; if a loop occurs, replace the condition with one based on %{HTTP:X-Forwarded-Proto} instead of %{HTTPS}. The same scheme-mismatch logic that causes loops in other platforms also applies to learning systems, and the diagnostic approach mirrors the one described in our osCommerce SSL and redirect loop guide.
Keep permanent links as the canonical form by never 301-redirecting goto.php requests into ilias.php yourself. ILIAS already issues the correct internal forward once a user is authenticated, and interfering with it breaks deep links shared in emails.
Crawler Access, Sitemaps and Diagnosing 404s
Most of an ILIAS installation sits behind a login, so indiscriminate crawling wastes crawl budget on pages that return login screens. Control this with a robots.txt in the document root. Allow the public entry points and permanent links while discouraging crawlers from chasing session and command parameters:
User-agent: *
Disallow: /setup/
Disallow: /ilias.php
Disallow: /*?cmdClass=
Disallow: /*&cmd=
Allow: /goto.php
Sitemap: https://www.example.com/sitemap.xmlILIAS does not generate a rich XML sitemap by default the way a blog does, because its content is permission-gated. The practical approach is to build a small static sitemap listing the public landing pages and the permanent links to openly visible courses and categories, then upload it as sitemap.xml in the document root via File Manager. Reference it in robots.txt as shown and submit it through your search console. Keep each entry as the clean goto_client_type_id.html form so the indexed URL matches what users share.
When pretty links 404, work through the evidence rather than guessing. In DirectAdmin File Manager open the account error_log in the ILIAS directory and reproduce the failing request; a missing-file 404 with no PHP error means the rewrite rule never matched, so recheck the regex and RewriteBase. A PHP fatal or memory error instead points at runtime limits during the GOTO dispatch, which you raise safely without server access by editing .user.ini in the document root:
memory_limit = 256M
max_execution_time = 120
max_input_vars = 5000Confirm the active PHP build under DirectAdmin MultiPHP Manager or Select PHP Version, since ILIAS is sensitive to version and extension availability, and .user.ini only applies to the interpreter that domain is running. After editing, wait the PHP file-cache interval (around 300 seconds) or reload via the panel before retesting. Finally, clear the ILIAS template and language cache from Administration → General Settings → Caching after changing base URLs, because stale cached links will keep pointing at the old host long after you have corrected the configuration.