Move Your Help Center From a Subdomain to a Subfolder

Move your help center from help.yourdomain.com to yourdomain.com/help with a Cloudflare Worker. Old links redirect automatically and rankings carry over.

Your help center already works on help.yourdomain.com or at its Helpdesky address, helpdesky.io/help/yourcompany. This guide shows how to move your help center from a subdomain to a subfolder, so it lives at yourdomain.com/help instead. The walkthrough uses a Cloudflare Worker, because most Helpdesky customers run their website behind Cloudflare. Your old links keep working: Helpdesky redirects every old subdomain address to the new one for you.

If you want the articles rendered inside your own website's templates instead of the Helpdesky layout, headless hosting is the alternative. Not sure which option is right for you? See Choosing Where to Host Your Help Center for a comparison of the Helpdesky address, a custom domain, a subfolder and headless hosting.

Should you move?

Moving is optional. Both setups work well for Google, and a help center on help.yourdomain.com is crawled and ranked just fine, with the SEO features Helpdesky adds automatically on either address. Move if you want your help content to count toward your main domain, or if you want one address for everything your customers see. If neither matters to you, stay where you are.

Before you start

You will need:

  • A website on Cloudflare. The DNS record for yourdomain.com must be proxied through Cloudflare, which means the orange cloud icon is on. Workers only run on proxied traffic.
  • Access to your Cloudflare account. Adding a Worker happens on the hosting side of your website, so this is usually a job for a developer.
  • Your Helpdesky address. Open Help Center → Domain & Address in your dashboard. The Hosting card shows your address in the form helpdesky.io/help/yourcompany, and the Worker code on that page is already filled in with it.
  • About 15 minutes. Most of that is clicking through the Cloudflare dashboard.

Site builders such as Wix, Squarespace, Shopify and WordPress.com do not let you run a Worker or proxy rule in front of your site, so the subfolder option is not possible there. Stay on the subdomain and follow Setting Up a Custom Domain instead.

Step 1: Create the Cloudflare Worker

The Worker receives every request for yourdomain.com/help, swaps the /help part for your Helpdesky address, forwards the request to Helpdesky and passes on the domain the visitor used.

  1. In your Helpdesky dashboard, open Help Center → Domain & Address. In the Hosting card, choose Subfolder on your website.
  2. Enter https://yourdomain.com/help in the Public address field and click Save address. Saving is safe: the status line reads Not active yet, and nothing changes for visitors until the check in Step 3 passes.
  3. Below the field, under Send everything under /help on your website to Helpdesky, open the Cloudflare Workers tab and copy the code. It already contains your own folder and Helpdesky address, so copy it from the page rather than from this article.
  4. Open the Cloudflare dashboard, pick your account and go to Workers & Pages.
  5. Select Create, stay on the Workers tab and choose Start with Hello World!.
  6. Give the Worker a name such as helpcenter and select Deploy. This publishes the placeholder code for now.
  7. Select Edit code, delete everything in the editor and paste the code you copied from Helpdesky.
  8. Select Deploy in the top right corner and confirm.

For reference, this is the code Helpdesky shows for yourdomain.com/help and the Helpdesky address helpdesky.io/help/yourcompany:

export default {
  async fetch(request) {
    const url = new URL(request.url);
    const prefix = "/help";
    if (url.pathname !== prefix && !url.pathname.startsWith(prefix + "/")) {
      return fetch(request);
    }
    const target = new URL(request.url);
    target.host = "helpdesky.io";
    target.pathname = "/help/yourcompany" + url.pathname.slice(prefix.length);
    const headers = new Headers(request.headers);
    headers.set("X-Forwarded-Host", url.hostname);
    headers.set("X-Forwarded-Proto", "https");
    return fetch(new Request(target.toString(), {
      method: request.method,
      headers,
      body: request.body,
      redirect: "manual",
    }));
  },
};

If you type it by hand, replace /help with your own folder and yourcompany with your own slug. The X-Forwarded-Host header is how Helpdesky learns which public address to use for links, canonical URLs and the sitemap, so do not remove it.

Step 2: Add the route

A route tells Cloudflare which URLs should run the Worker. Without it the Worker exists but never receives any traffic. Helpdesky shows the route you need right under the code: yourdomain.com/help*.

  1. In Workers & Pages, open the Worker you just created.
  2. Go to Settings, then Domains & Routes, and select Add.
  3. Choose Route.
  4. Under Zone, select yourdomain.com.
  5. Under Route, enter yourdomain.com/help*. The asterisk at the end matters.
  6. Leave the remaining options as they are and select Add route.

The pattern yourdomain.com/help* matches yourdomain.com/help, yourdomain.com/help/ and every article, category and search address below it. If your website lives on www.yourdomain.com, enter www.yourdomain.com/help* here and use https://www.yourdomain.com/help as the public address in Helpdesky.

Only /help needs forwarding. Images, search and Ask AI load from Helpdesky directly, so the rest of your website is not touched.

Step 3: Run Check setup in Helpdesky

  1. Back in your Helpdesky dashboard, open Help Center → Domain & Address and scroll to the Check setup box in the Hosting card. It reads "We load https://yourdomain.com/help through your website and report what arrived."
  2. Click Check setup.

Helpdesky now requests your help center through your Worker and reports five checks: Your address answers, Requests reach Helpdesky, The folder is removed before forwarding, Your domain arrives in X-Forwarded-Host and A help center page loads. When all five pass, the result reads "Everything arrived correctly." and a Make it live confirmation opens. It names the address, lists what changes once you confirm (it becomes the main address; links, the widget, canonical URLs and the sitemap switch to it; the old subdomain starts redirecting) and how to undo it. Nothing changes for visitors until you confirm, however often you run the check.

If a step fails, the result reads "Something isn’t right yet. Fix the failing step, redeploy, and check again." Jump to the troubleshooting section below, fix the Worker or the route, and click Check setup again. You can run it as often as you like.

Step 4: Go live

Subfolder mode switches on when Check setup passes and you confirm with Make it live. Helpdesky runs the same check once more at that moment and, if it still passes, the notice reads "Subfolder address is live". Until then nothing changes and your help center keeps serving on the old address, so you can prepare the Worker well before you switch. From that moment on:

  • Your help center answers at yourdomain.com/help/.... The top of the Domain & Address page reads "Your help center is live at yourdomain.com/help". Internal links, search, Ask AI, canonical URLs, social share tags, structured data and the sitemap all use the new address.
  • Every old subdomain link redirects automatically. A visitor or crawler opening help.yourdomain.com/your-article receives a permanent (301) redirect to yourdomain.com/help/your-article. Your custom domain stays connected to Helpdesky as a previous address, and the page shows a Your help center has moved notice with the details. You do not need to set up any redirects yourself.
  • Your Helpdesky address keeps working. Pages at helpdesky.io/help/yourcompany/... still open, and each one names the subfolder address as its canonical URL, so search engines treat yourdomain.com/help as the original.
  • Your widget, contact form and ticket center keep working. They stay on Helpdesky addresses and are not affected by the move.

Keep the DNS records for help.yourdomain.com in place, exactly as they are. Helpdesky serves the redirects, so the old hostname must keep pointing at Helpdesky for them to work. The Stop redirecting button on the Domain & Address page disconnects the old domain and ends the redirects, so leave it alone. Google recommends keeping redirects like these for at least a year.

Step 5: Tell Google

Google discovers the move by following the redirects, but a few small steps speed it up:

  1. Submit the new sitemap. In Google Search Console, open the property for yourdomain.com, go to Sitemaps and submit https://yourdomain.com/help/sitemap.xml. If you only have a property for help.yourdomain.com, add a Domain property for yourdomain.com first. It covers every subdomain and path at once.
  2. Add the sitemap to your website’s robots.txt. Your own site serves yourdomain.com/robots.txt, not Helpdesky, so add this line to that file: Sitemap: https://yourdomain.com/help/sitemap.xml. The Domain & Address page shows the exact line with a copy button.
  3. Keep the old property. Leave the help.yourdomain.com property in Search Console. Its pages redirect, and so do its robots.txt, sitemap.xml and llms.txt: they now point at your site’s own robots.txt and at the new sitemap.xml and llms.txt under /help, so the old hostname stops advertising itself. The property is still worth watching: its indexed page count should fall as Google processes the redirects, and its crawl reports show any errors on them. Google also suggests submitting a sitemap of the old URLs so it recrawls them sooner. Save a copy of help.yourdomain.com/sitemap.xml before you click Check setup (afterwards, rebuild it from the new sitemap by swapping https://yourdomain.com/help/ for https://help.yourdomain.com/), host the file anywhere on yourdomain.com and submit it in the yourdomain.com Domain property.
  4. Give it a few weeks. Rankings usually transfer within a few weeks as Google recrawls the old pages, follows the redirects and updates its index. A short dip in traffic during that time is normal for any URL change. Google’s guide on site moves with URL changes explains what happens behind the scenes. The Change of Address tool does not apply here, because it only handles moves between domains; the redirects do that job for a subfolder move.

Troubleshooting

Each failing check names the problem. These are the ones that come up with Cloudflare:

"Your rule forwards the whole path, /help included." The Worker passed /help/... on to Helpdesky unchanged. Deploy the code from the Domain & Address page without edits, and make sure the folder in the Worker matches the public address you saved in Helpdesky.

"The X-Forwarded-Host header didn’t arrive." Helpdesky received the request but not the X-Forwarded-Host header. Confirm the Worker code still sets it, and check that no Transform Rule in Cloudflare removes or overwrites request headers on /help.

"https://yourdomain.com/help keeps redirecting." The request ended up back where it started. This is usually an older rule that redirects /help to help.yourdomain.com, or a Worker that was edited to forward to your custom domain instead of your Helpdesky address. Look through Redirect Rules, Bulk Redirects and Page Rules in Cloudflare and remove anything that touches /help, and keep helpdesky.io as the target in the Worker.

"yourdomain.com answered /help itself" followed by the status code your site returned. Cloudflare did not run the Worker at all. Two settings cause this:

  • The orange cloud is off. Workers only run on proxied traffic. In Cloudflare’s DNS section, make sure the record for yourdomain.com (and www, if you use it) shows Proxied with the orange cloud. Switch it on and run Check setup again.
  • The route is on the wrong zone or missing the asterisk. Open your Worker’s Settings, then Domains & Routes, and check that the route reads yourdomain.com/help* under the yourdomain.com zone. A route without the * only matches yourdomain.com/help itself, so the help center homepage works but every article shows your own website’s 404 page. A route added under a different zone never runs at all.

Other platforms

Not on Cloudflare? The Subfolder on your website option on the Domain & Address page also shows prepared rules for Vercel, Next.js, Netlify and nginx, each filled in with your own folder and Helpdesky address. Paste the one for your platform into your site’s configuration, then continue from Step 3 above.

Ready to move? Open Help Center → Domain & Address, choose Subfolder on your website and start with Step 1. If you would rather keep the subdomain, Setting Up a Custom Domain covers that setup.

Last updated on October 2, 2026