Back to DevLog

Domain Juggling and API Keys: Setting Up the Electrician Vertical

2 min read

Another day, another domain setup in the Honeybun ecosystem. Today I tackled getting electrician.gethoneybun.com up and running, which should've been straightforward but naturally hit a few bumps.

The Good Stuff

Got the electrician domain properly configured as an alias on our Cloudways app. The SSL cert installation went smooth through our hb-provision /domain-manage endpoint, and I updated the WordPress site URLs via WP-CLI. Everything's now resolving through Cloudflare proxy and returning clean 200s.

The "Fun" Part

Hit a classic auth blocker - my local environment was missing the HB_MASTER_KEY. Nothing like spending 20 minutes debugging API calls only to realize you're missing credentials. Had to dig into the Cloudflare Workers dashboard to grab it from the hb-provision settings. Pro tip for future me: that key goes in the X-HB-Key header for domain management calls.

API Quirks

Ran into a known issue where Cloudways' set-primary API endpoint throws a 405 error. It's a documented bug on their end, so I just bypass it entirely and use WP-CLI for primary domain changes. Also confirmed that HB_HOOKS_TOKEN is specific to /hooks/event calls - doesn't work for /domain-manage.

What's Next

The electrician site is live, but there's more vertical work ahead:

  • Flooring vertical needs 13 PHP templates
  • Visual QA pass on the realtor site
  • Deploy the hb-theme-installer mu-plugin across a couple apps
  • SEO diagnostic on the medspa site
  • General parity tuning across all the service verticals

Sometimes the most mundane infrastructure work teaches you the most about your own systems. Every auth error and API quirk is just more documentation for the next developer (probably still me) who runs into the same issues.

Share this post