Table of Contents

Hosting HelpDocs at a Subfolder of Your Site

By default HelpDocs comes with a subdomain and a custom domain. If you need to, it's possible to host your HelpDocs at a subfolder of your own domain, and there's a couple ways to do that.

Taylor Sloane
Updated by Taylor Sloane

By default HelpDocs comes with a subdomain (e.g. support.helpdocs.io) and a custom domain (e.g. help.domain.com). They're great for SEO by default (Google's pretty good at working out which content's yours now!) and for most customers there's no need to change things.

There's some cases where it's desirable to integrate your docs more into your site.

If you need to it's possible to host your HelpDocs at a subfolder of your own domain and there's a couple ways to do that.

Embedding with an iframe 

You can easily add an iframe to your HelpDocs subdomain from anywhere on your site. This is a little tricky to make look awesome but we have some customers that've done this super successfully.

<iframe src="https://support.helpdocs.io" height="500" width="1000"></iframe>

You can even update URLs in the address bar when people click links. You'd need to write a little custom JavaScript inside your HelpDocs and on the page where you're embedding it.

Then use something like easyXDM to send messages between the two. You'll want to do that on page loads at either end.

Hiding Navigation in an iframe

If you're looking to embed your iframe in a website or an app you might like to hide the navigation so it looks native. While we can't give explicit instructions here are some general steps you could take.

This is pretty advanced, so you'll want to get a developer to help with this.
  1. Add a class to the elements you want to hide

If you're using a custom theme you can easily add a class in the hbs files. Otherwise you'd probably want to use jQuery. A class name like hide-in-app should do it.

  1. When the iframe is loaded in your website/app, add a query parameter

You can add something like ?hide=true to the end of the URL so you can tell when it's being loaded in your website/app.

  1. Read that query parameter with some JavaScript

Something along the lines of this should do it, although always check.

/[?&]hide=true/.test(location.search)
  1. If the query parameter is there, remove it

You can achieve this pretty easily with jQuery. Here's an example:

$('.hide-in-app').hide()

Advanced: Using a Reverse Proxy

You can also reverse proxy your docs through something like nginx. You'll need set up a listen block to rewrite the URL of your subfolder to your HelpDocs subdomain, like this:

location /help/ {
resolver 8.8.8.8;
set $proxy_pass_url https://support.helpdocs.io;
rewrite ^/help/(.*) /$1 break;
proxy_pass $proxy_pass_url;
proxy_ssl_server_name on;
}

Then in the HelpDocs dashboard, include the subfolder in Settings > General > Custom Domain. So that'll look something like myapp.com/help

We'll take care of rewriting all the internal links our side.

Debugging nginx

nginx is an awesome reverse proxy... until it's not. Depending on your setup, you may experience a variety of problems getting this working, especially when you're working with SSL and load balancers. If you're having problems, try experimenting with these options:

Option

Possible Value(s)

proxy_ssl_name

Your HelpDocs subdomain host (e.g. support.helpdocs.io), your custom domain host (e.g. support.yourdomain.com)

proxy_set_header

$host, your HelpDocs subdomain host (e.g. support.helpdocs.io)

We can't help you with the specifics of embedding or reverse-proxying your site, but if you need anything different on the platform to make your implementation easier we're always happy to take feedback!
We only support one level subfolder hosting, but you’re welcome to try and do loads if you’re an nginx wizard 🌟

What did you think of this doc?

Featuring a Category

Testing Customizations with .dev

Get in touch

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply.