Configure a Vanity Domain Name for a Service Instance

By using the load balancer as the front-end to your Oracle Java Cloud Service instance, you can quickly and easily associate a vanity Internet domain name to your application environment. Rather than accessing your applications using a public IP address, clients can use your custom domain name.

For example, end users might currently access your application with the URL https://203.0.113.10/getstarted. But instead you want them to use the vanity URL https://myapp.example.net/getstarted.

The steps to configure a vanity URL are different for service instances that use an Oracle-managed load balancer and for service instances that use a user-managed load balancer (Oracle Traffic Director).

Register a Custom Domain Name with a Service Provider

Third-party vendors enable you to register custom domain names that resolve to your Oracle Java Cloud Service load balancer.

To route external traffic to your load balancer, you must register the domain name (for example, example.net) with your Domain Name System (DNS) provider. Oracle Java Cloud Service does not register the domain name with your DNS provider.

Follow the instructions provided by your third-party registration vendor to resolve your custom domain name to the public IP address of the load balancer in your service instance.

To route traffic within Oracle Cloud Infrastructure to your load balancer using the custom domain name, you can register it as a zone using the Oracle Cloud Infrastructure DNS Service. See Managing DNS Service Zones in the Oracle Cloud Infrastructure documentation.

Add a Vanity URL to an Oracle-Managed Load Balancer

If your service instance has an Oracle-managed load balancer, use the Oracle Java Cloud Service console to add a vanity domain name to the load balancer.

When you create a service instance with a Oracle-managed load balancer, the load balancer is accessed from a default URL. You can personalize access to your applications by adding one or more vanity URLs to the load balancer.

Because users access the load balancer with the HTTPS protocol, a vanity URL requires a public certificate and a corresponding private key. The files containing your certificate, private key, and certificate chain must be in PEM format. The private key must not require a password.

If at a later date you need to replace the certificate with a different one, you can delete and recreate the vanity URL.

The following procedure does not apply to an instance of Oracle Cloud Infrastructure Load Balancing that you've created yourself and then configured to use the service instance nodes.

  1. Navigate to the Overview page for the instance to which you want to add a vanity URL.
  2. Locate and expand the Load Balancer section of the page.
    The load balancer endpoint is displayed.
  3. From the Actions Menu icon menu, select Add Vanity URL.
  4. For Public Certificate, select the file containing your certificate for the custom domain name.
  5. For Private Key, select the file containing the corresponding private key for the certificate.
  6. If you have multiple certificates that form a single certification chain, you must include all relevant certificates in one file. For Certificate Chain, select the file containing your certification chain.
  7. Enter your Virtual Host.
    Do not include the protocol (http:// or https://) or port number.

    For example: myapp.example.net

  8. Click Add.
The instance is in maintenance mode until the operation is completed.

Delete a Vanity URL from an Oracle-Managed Load Balancer

If your service instance has an Oracle-managed load balancer, use the Oracle Java Cloud Service console to delete a vanity URL from the load balancer.

The following procedure does not apply to an instance of Oracle Cloud Infrastructure Load Balancing that you've created yourself and then configured to use the service instance nodes.

  1. Navigate to the Overview page for the instance from which you want to delete a vanity URL.
  2. Locate and expand the Load Balancer section of the page.
    The load balancer endpoint is displayed.
  3. Click Delete Vanity URL Delete icon for the vanity URL you want to delete.
  4. When prompted for confirmation, click Delete.
The instance is in maintenance mode until the operation is completed.

Update Oracle Traffic Director to Use a Custom Domain Name

If your Oracle Java Cloud Service instance uses Oracle Traffic Director as a load balancer, update the load balancer configuration to use the custom domain name.

By default, if you created your service instance in an Oracle Cloud Infrastructure Classic region, external access to the load balancer console is disabled for security purposes. If you did not enable console access while provisioning your service instance, see Enabling Console Access in an Oracle Java Cloud Service Instance.

  1. Access the Oracle Java Cloud Service console.
  2. Click menu icon for the desired service instance and select Open Load Balancer Console.
  3. Log in to console using the credentials defined when provisioning your service instance.

    If you created your service instance using the Oracle Java Cloud Service console, the user name and password default to the Oracle WebLogic Server Administration Console user name and password.

  4. Access the load balancer configuration (for example, opc-config):
    • If your service instance is running Oracle Traffic Director 12c, click the Target Navigation icon Target Navigation icon. Expand the Traffic Director folder and click the name of the Traffic Director configuration.
    • If your service instance is running Oracle Traffic Director 11g, click Configurations and then click the name of the Traffic Director configuration.
  5. Navigate to the Virtual Server in this configuration (for example, opc-config):
    • If your service instance is running Oracle Traffic Director 12c, click Traffic Director Configuration and select Administration > Virtual Servers. Click the name of the virtual server.

    • If your service instance is running Oracle Traffic Director 11g, expand Virtual Servers in the navigation pane and click the name of the virtual server.

  6. In the General Settings section edit the Hosts field. Enter the custom domain name (for example, example.com) that you registered.

    If there are multiple entries, separate each by a comma.

  7. Activate your changes:
    • If your service instance is running Oracle Traffic Director 12c, click Apply.

    • If your service instance is running Oracle Traffic Director 11g, click Deploy Changes.