Custom Domain for Oracle APEX Apps — Clean URLs for Your Customers with PHP Redirect
Instead of long APEX URLs, give your customers a clean domain. One PHP file does the rest.
When you build an Oracle APEX application for a customer, the URL they get looks something like this:
https://app.mysmart-invoice.com/ords/r/invoice_prod/invoice
That's not something you put on a business card. Customers don't want to remember technical paths, port numbers, or workspace names. They just want to type a domain and land in their application. The solution is surprisingly simple: one PHP file on any standard web hosting.
How It Works
The idea is straightforward: you point a clean domain (like mysmart-invoice.de) to any standard web hosting that runs Apache + PHP. On that hosting, you place a single index.php file that immediately redirects the visitor to the real APEX URL. The customer never sees the long URL — they only ever interact with the clean domain.
mysmart-invoice.de in the browserindex.phpCreate a file called index.php with the following content. Replace the URL with your actual APEX application URL:
<?php
// The URL of your Oracle APEX application
$url = 'https://app.mysmart-invoice.com/ords/r/invoice_prod/invoice';
// Redirect the visitor
header('Location: ' . $url);
// Stop script execution
exit();
?>
exit() after the header?PHP continues executing code even after sending a
Location header. The exit() call ensures the script stops immediately — nothing else runs, no content is sent to the browser.
Upload the index.php to the root directory of your domain (usually public_html/ or httpdocs/). That's the only file you need — no CMS, no framework, no database.
If you prefer not to use PHP, you can achieve the same result with an .htaccess file. This works on Apache servers without any PHP dependency:
Redirect 301 / https://app.mysmart-invoice.com/ords/r/invoice_prod/invoice
Use 301 (permanent redirect) if the APEX URL will never change — browsers and search engines cache this. Use 302 (temporary) if you might point the domain somewhere else later. For customer applications that are live long-term, 301 is the right choice.
One Customer = One Domain
The real power of this pattern: every customer gets their own domain, each pointing to their specific APEX application. The setup is the same every time — just change the URL in index.php.
| Customer Domain | APEX Application |
|---|---|
mysmart-invoice.de | Invoice management app |
mysmart-invoice.com | Same app — international domain |
portal.customer-b.de | Customer B's APEX portal |
app.customer-c.com | Customer C's APEX dashboard |
You can even cover multiple TLDs for the same customer (.de and .com) — each with their own index.php, both pointing to the same APEX URL. That's exactly how mysmart-invoice.de and mysmart-invoice.com work.
index.php.Final Thoughts
This is one of those solutions that takes 10 minutes to set up and looks completely professional. Customers never have to deal with ORDS paths, workspace names, or port numbers. They get a domain they recognize, and it just works.
We use this pattern for every customer delivery at S&H Software Solutions. The hosting cost is negligible, the setup is repeatable, and if we ever need to move the APEX application to a different server or URL — we update one file, and the customer never notices.
{fullWidth}