title: Correct structure for custom domain feature for SAAS users
body: <p>I am building a Saas platform (lets assume domain is www.saas.com) where user have unique subdomains such as user1.saas.com, user2.saas.com etc. And give them a feature to add their own custom domain.</p>
  
  <p>To add custom domain, users define cname for app.saas.com and A record for public id in of my app.</p>
  
  <p>Everything is working fine if cname and A record is defined correctly by users. But i have two concers about this: </p>
  
  <ol>
  <li><p>To host my app, i used cloudways and select digital ocean servers. But if i want to move from Digital Ocean to AWS at some point, then public ip is going to change. So custom domains wont work until users change their A record.I wonder if is there a better way to give custom domain feature to user instead of adding A record? (I am not sure if cname and a record is the correct way for this feature)</p></li>
  <li><p>Let's assume user1 is defined own domain for user1.saas.com. When i go to user1.saas.com, it is also working. I think, i should redirect this url to custom domain if it is defined. I wonder if this is a correct way?</p></li>
  </ol>
  
  <p>Thanks in advance
  Anil</p>