3

I own a .me domain (bought with GoDaddy), where I have my web hosted using Github pages. Now, I would like to create a sub-domain or sub-page (such that subdomain.example.me or example.me/subdomain) and fill it with an external template that I want to buy using a web-provided such as Squarespace. Is is possible to do that?

2
  • 2
    Your second example is a subdirectory, not a subdomain. It is more accurate to say example.me/subdirectory. – Stephen Ostermiller Feb 28 at 13:28
  • You can, and if something goes wrong, to whom will you turn? – Robbie Goodwin Mar 3 at 22:57
3

You can do this for a subdomain (ie subdomain.example.com) - as DNS is designed (among other things) to direct different different subdomains to appropriate ip addresses.

It is only indirectly possible to have 2 servers hosting content to a site (ie in the case example.com/resource1 on a different server to example.com/ or example.com/resource2) and a lot harder to implement. In order to do this you need to add some kind of reverse proxy or load balancer which accepts the requests and then gets them to the appropriate server. I believe Cloudflare may be able to do this and I know that Apache can be confugured to do this using mod-proxy with proxypass rules - but setting this up requires access to the server configuration and some specialist knowledge). There are analogous mechanisms for NGINX as well as standalone proxies.

2

It should be relatively straight forward to configure a subdomain to point to another service like Squarespace, however, to point a subdirectory to an external host requires very different technologies and is unlikely to be possible with using only Github pages and Squarespace.

To forward the subdomain you would configure either an A record in the DNS to point to an IP address at Squarespace (or a CNAME record to point the subdomain to an already configured domain at Squarespace) and configure this hostname/subdomain at Squarespace, so that it knows to accept requests to this hostname.

However, to forward a subdirectory requires that you configure a reverse proxy at your source host (Github pages), which AFAIK Github pages does not support*1. This may also be against Squarespace's interests/T&Cs and they could potentially (attempt to) block the request.

*1 Although as noted by @davidgo in comments, you could employ an additional service that sits in front of Github pages that implements the reverse proxy.

1
  • I largely agree, but would point out it is quite possible to configure a reverse proxy at another location altogether, so it does not need to be supported by Github. I skimmed through the Squarespace T&Cs and their Product specific terms and could not find anything against putting a proxy in front of the site. Squarepsace havehttps://support.squarespace.com/hc/en-us/articles/213469948-Connecting-your-domain-to-CloudFlare) a specific page for connecting through Cloudflare, so I posit this is practical ( – davidgo Feb 28 at 23:51
0

Yes it is possible to create https://here.example.com hosted on a different server, create a subdomain name and set the DNS A record to your desired IP address.

Sub path is harder to implement and generally your host will need to setup and will most likely change an extra monthly cost to do so. Not impossible just more difficult.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.