USA Service Dogs
Unify custom WordPress theme & NodeJS application on 1 domain
Lead developer tasked with developing custom WordPress theme & engineering reverse proxy
We could have easily created a subdomain (https://blog.clientsite.com) and have the domain registrar point that to the WordPress install on our WordPress host. However, the client didn’t like the way the URL looked, preferring 1 unified domain (https://clientsite.com) for all applications. More importantly, SEO best practices held that blog should be on the same domain as the main application in order to share any search equity (at least that was the thinking at the time).
Another approach allowed us to host the WordPress install separately, and have it accessible as a subfolder on the primary domain name: https://clientsite.com/blog. This is the approach we decided to go with, as it satisfied the most two main concerns of the client:
– A seamless experience for the visitor that looks like it’s one site,
– Allowed the application to benefit from the search equity earned by the blog
To achieve the first goal of a seamless experience, I created a custom WordPress theme (I created a child theme for Understrap – a “starter” theme based off Automattic’s _’s that makes use of Bootstrap) that matched the main application’s design. We manually imported the existing blog entries and installed the entire blog on our new WordPress hosting partner, Kinsta.
In order to have the blog run on subfolder of the primary domain, I implemented a Reverse Proxy at Kinsta to accept traffic being sent to https://clientsite.com/blog. I then worked with the client to create a rule in the routing application (ExpressJS) to forward requests to Kinsta.
However, I did build the WordPress headers and footer in a way that will allow for easy replacement in the future, where we can share code between the two applications; this will allow for easier site maintenance moving forward.