Learn how to set up a custom domain to host your pre-production Hub on a subdirectory of your website (like www.mycompany.com/resources).
Before You Begin
- In this article, we're assuming you already know about custom domains and your options for implementing one, and have decided on the subdirectory option.
- Before you proceed, we strongly recommend reading this article first. It explains how the subdirectory option works, and the instructions below will assume you are familiar with the concepts it covers.
- The instructions in this article apply to live Hubs, i.e. any Hub that is already in production and receiving traffic. For Hubs that are in pre-production (new/under development), see this article.
- To follow these instructions, you need to be an Account Admin.
- Some of the steps will require knowledge of your current website hosting setup as well as the ability to make changes to it. For these parts, you will most likely need to get help from your organization's web administrator.
- All the instructions in this article refer to a single Hub. If you have multiple Hubs that you want to set up on subdirectory custom domains, the instructions will be exactly the same — you just have to repeat the steps for each separate Hub (as needed).
What You'll Need
To host your Hub on a custom domain that is a subdirectory of your website, you will need reverse proxy capability on that website. The reverse proxy can be implemented in any form you choose (see this article for more information about the various options), as long as it supports the functionality outlined in the checklist below. Ask your web admin to review the checklist to confirm that your current setup will work.
Note that the reverse proxy must already be in place before you proceed. This article will not cover how to add a reverse proxy to your website.
Reverse Proxy Functionality Checklist
No matter what kind of reverse proxy you intend to use, it must be able to:
- Proxy requests under a given subdirectory to a specific origin server.
- This means you must be able to set up a rule on the reverse proxy to take requests for
http://www.mycompany.com/resources/*and direct them to a server you specify (i.e. Uberflip's server). Note that the rule must also be applicable to requests for directories under the main subdirectory specified, such as
- This means you must be able to set up a rule on the reverse proxy to take requests for
- Proxy requests with the following HTTP methods: GET, POST, HEAD, and OPTIONS.
- This just means that at minimum these types of requests must be passed through to the origin server — you do not have to block other request types.
- Pass through requests to the origin server unmodified and in their entirety.
- This means that the requests must come through with the full requested URL and all headers (user agent string, cookies, etc.) intact — the reverse proxy must not strip anything out or otherwise change the request in any way. This is important for accurate Hub metrics.
- Disable caching of the origin server.
- This is mainly specific to CDNs, as their default behavior is usually to cache (make a copy) of the origin server and serve up the copy instead. If it does this, metrics for the Hub will be inaccurate, so make sure caching is turned off.
If your reverse proxy meets all these requirements, you're ready to set up your Hub on a subdirectory.
Step 1: Contact Us
To get started, reach out to your Uberflip Customer Success Manager and let them know that you're interested in setting up a custom domain on a subdirectory. They'll be able to provide guidance throughout the process, and will facilitate the parts of the setup process that need to happen on Uberflip's end.
Step 2: Choose and Create the Subdirectory
You'll need to begin by deciding what you want the subdirectory to be. This is where your visitors will go to access your Hub, so it's time to get creative! We recommend choosing something that describes what your visitors can expect to find in your Hub. Here are some examples to get you started:
The subdirectory can be at any level in the directory structure. For example, if you want your Hub to be accessible under the subdirectory hub, but you want that to live under
this is also possible.
Once you've decided on the subdirectory you want, you have to create it on your website. Your website admin should be able to do this for you.
Step 3: Hand off to Uberflip to Create a Test Hub and Link the Custom Domain
At this point we'll need to do some setup work on our end, so your next step is to get back in touch with your Uberflip CSM.
- Let your CSM know that you've created the subdirectory on your website where your Hub will live.
- Provide the URL for the subdirectory, i.e. the URL you want to use for your Hub. For example:
- Hub URL (Subdirectory): www.mycompany.com/resources
- Indicate whether your website uses SSL (HTTPS).
- If your website does use SSL, you do not have to provide us with a certificate. The certificate that applies to your main website will also cover the subdomain where your Hub will live.
Here's what's going to happen next:
- Since you're intending to move a live Hub to a new domain, your CSM will create a temporary testing Hub for you that we'll use during the setup phase. This allows us to make sure everything is working properly without affecting your live Hub.
- Your CSM will also add the URL you chose to your Uberflip account as a custom domain, then link that custom domain to the testing Hub. During testing, this will allow Uberflip to serve up the test Hub when your reverse proxy passes through a request for your the custom domain URL to our origin servers.
Step 4: Configure Your Reverse Proxy
When everything is ready to go on Uberflip's end, your CSM will let you know that you can now configure your reverse proxy. This will set it up so that requests for your Hub's URL are sent to Uberflip's origin server, which will return your Hub (or rather, the testing Hub for now).
As it requires access to your website's hosting infrastructure, this step generally has to be performed by your web administrator. We've created a separate guide to help them do that, which you can find here:
Just provide the guide to your web admin and ask them to perform the setup for you.
Step 5: Test the Reverse Proxy Setup
When your web admin has finished setting up the reverse proxy, let your CSM know so they can help you test it. You can also do some initial testing at this stage: simply go to the Hub URL in your browser, and the testing Hub should come up. Navigate around the testing Hub a little to see if it's all working as expected.
Once your CSM gives you the all-clear that the reverse proxy is configured properly, you just have to decide when you want to switch over.
Step 6: Switch Over to the New Custom Domain URL
Your CSM will work with you to decide on a date for the switch to the new URL. Once you have settled on a date and a cutover plan, here's what will happen next:
- Your CSM will unlink the testing Hub from your new custom domain.
- They will then move your live Hub from your old custom domain (if you were using one) to the new custom domain (subdirectory). This will instantly make the new custom domain the active domain for your Hub.
- At the same time, they will set up a redirect on your Hub's previous domain so that any requests for it are automatically redirected to the new domain. They will also ensure any canonical URLs we have stored are updated to the new domain as well.
Step 7: Test that Everything is Working
When they've completed the cutover, your CSM will notify you that your Hub is ready on the new custom domain. At this point, you can test that it's working properly: just go to your new custom domain's URL in your browser, and your live Hub should load up. Navigate around a little and make sure everything is working as expected.
Does everything look good? If it does, congratulations — you've successfully set up your Hub on a subdirectory custom domain!
If anything isn't working correctly, let your CSM know right away so they can start troubleshooting (and temporarily revert your Hub back to the old custom domain, if necessary).
Once you have your Hub up and running on your subdirectory custom domain, here are a few things you might also need to look into:
- Sitemaps: Uberflip automatically generates sitemaps for Hubs, but this doesn't work for Hubs hosted on custom domains that are subdirectories. If your website uses a sitemap, you'll need to manually update it to include your Hub's stream URLs.
- No Robots Meta Tag: If you want to use the No Robots Meta Tag setting on your Hub to prevent search engines from indexing it, this also doesn't work if you're hosting the hub on a subdirectory. Instead, you'll need to update your main website's robots.txt file.
Why is this necessary? It has to do with how using subdirectory custom domains work.
When your Hub is hosted on the default Uberflip subdomain, or on a custom domain that's a subdomain, the Hub basically has its own domain. This means that its sitemap and No Robots Meta Tag are specific to that domain, and because the domain is controlled by Uberflip, we have the ability to directly modify its sitemap and robots.txt.
However, when you host your Hub on a custom domain that is a subdirectory of your website, it is part of that website's domain. Therefore, it falls under your main website's sitemap and robots.txt — which Uberflip doesn't have access to. Since we can't modify them for you, you would need to do so manually. If you need some guidance on how to do this, please contact Uberflip Support.