Search code examples
wordpressdnssquarespace

WP site accessible at subpath of domain used by Squarespace site


Alright this is a super weird request and it's just a stopgap measure until the client cleans up their many web properties, so no need to tell me that it's a convoluted way to do things. Current setup:

  • example.com is registered with GoDaddy but points to a Squarespace site (CNAME & A records, etc)
  • sub.example.com is a Wordpress site on Godaddy hosting

Question: Can I make the WP site at sub.example.com instead appear as example.com/sub? If so, how?

I can set the site_url and home_url in WP, and I can set up a forwarding rule from Squarespace to the IP of the GoDaddy shared hosting account. Would that be enough?

I had thought I would need to set an A record with the host as example.com/sub, but slashes aren't allowed. Any insight greatly appreciated. Thanks for reading!


Solution

  • the only way to get this done that I am aware, is to use some form of land balancer, e.g.:

    • AWS Elastic Load balancer
    • Nginx / apache proxy
    • AWS CloudFormation custom backends

    last option will also speed up your site.

    Unless your DNS provider have some custom option, DNS alone can't do that.