skip to Main Content

My client has a domain (let’s say www.clientdomain.com) which is linked to a Woocommerce store hosted at GoDaddy.

I’m currently deploying an application consisting on a Flask API and a React SPA. The Flask API will be hosted at PythonAnywhere, while the React SPA is deployed at Firebase hosting.

Can I use www.clientdomain.com/<api_name> as the domain for the API, and www.clientdomain/<frontend_application> even although the root domain (www.clientdomain.com) directs to a different application at a different hosting?

2

Answers


  1. Yes, you can use a subdomain of your client’s domain (e.g. api.clientdomain.com) for your Flask API, and another subdomain (e.g. frontend.clientdomain.com) for your React SPA. This is possible because subdomains are treated as separate domains, even though they are part of the main domain.

    Keep in mind that we are speaking about subdomains, www.clientdomain.com/<api_name> and www.clientdomain.com/<frontend_application> are directory of the main domain, they aren’t subdomains

    To use a subdomain for your Flask API, you will need to create a subdomain in your domain’s DNS settings, and then point that subdomain to the IP address of your PythonAnywhere server. You can then configure your Flask API to be accessible at that subdomain.

    Similarly, you can create another subdomain for your React SPA and point it to the IP address of your Firebase hosting server. This will allow you to access your React SPA at that subdomain.

    Login or Signup to reply.
  2. Yes, you can host your Flask Api on your subdomain, it will be something like flask.yourdomain.com. It won’t impact anything to your main site.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search