Custom Domain: Set up Your Hub on a Subdirectory

Follow

Learn how to set up a custom domain to host your 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.
  • 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
      http://www.mycompany.com/resources/blog/posts
  • 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:

  • www.mycompany.com/resources
  • www.mycompany.com/insights
  • www.mycompany.com/learn
  • www.mycompany.com/community
  • www.mycompany.com/hub

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

www.mycompany.com/resources/insights/hub/

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 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.

  1. Let your CSM know that you've created the subdirectory on your website where your Hub will live.
  2. 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
  3. 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.

Your CSM or OS will link the custom domain you chose to your Hub as a secondary domain. This means that your Hub will remain accessible under its current domain, but will also become accessible under the new custom domain for testing (it will be set to not be indexed by search engines) once your reverse proxy is set up.

 

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 new custom domain are sent to Uberflip's origin server, which will return your Hub.

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 Hub should come up. Navigate around the 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

Your CSM will work with you to decide on a date for the switch to the new custom domain. Once you have settled on a date and a cutover plan, here's what will happen next:

  • Your CSM will remove your new (subdirectory) custom domain from your Hub as a secondary domain.
  • They will then move your Hub off your old custom domain (if you were using one), and make the new custom domain (subdirectory) the primary domain. 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.
  • 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 verify that it's working properly: just go to your new custom domain's URL in your browser, and your Hub should load up (as it did before, during testing). 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).

 

 

Next Steps: SEO Settings

Once you have your Hub up and running on your subdirectory custom domain, the next thing you should do is make sure you have set up your SEO settings correctly. Even if you have already done this previously, there are some differences that are specific to subdirectory custom domains that you'll need to account for.

The reason for this is that key SEO mechanisms (like sitemaps and robots.txt) generally apply to the entire domain, so search engines like Google look for them in the root (or lowest/main) directory of the domain. On a subdomain custom domain (e.g. https://resources.mycompany.com/), Uberflip has access to the root directory, and can place and modify sitemaps and robots.txt here.

However, on a subdirectory custom domain (e.g. https://www.mycompany.com/resources), the root directory is part of your website's domain — and Uberflip does not have access to it. This means that while Uberflip will still generate sitemaps and robots.txt for your Hub, they will be placed in the subdirectory. Google will not look for them there, so unless you take some action, they will have no effect.

Here's what you will need to do:

  • Sitemaps: Get your Hub's sitemap index file and submit it to Google Search Console. You can get your sitemap index file by adding sitemap_index.xml to the end of your Hub's homepage URL, e.g. https://www.mycompany.com/resources/sitemap_index.xml. You'll only need to do this once — Google will automatically follow any changes to a previously submitted sitemap.
  • Robots.txt: Uberflip uses robots.txt to block search engines from indexing your entire Hub (i.e. when the Hub-level No Robots Meta Tag setting is turned on). If you want to do this, you will need to manually add a rule to your main website's robots.txt to prevent indexing of the subdirectory containing your Hub (and anything within it). If you want your Hub to be generally indexable and only specific Streams to be blocked, you can simply use the Stream-level No Robots Meta Tag setting, and do not need to make any changes to robots.txt.

If you need some guidance on how to complete these steps, please contact Uberflip Support.

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.