Hi @Shyam Kumar
In addition to the points provided by Deepanshukatara-6769,
You can go for Dynamic DNS (DDNS) provider for free testing, the main advantages of using this, it is free, quick setup and works for testing your load balancer setup.
Find a free DNS provider like No-IP, DuckDNS and FreeDNS and create an account and choose your subdomain.
In your DDNS provider control panel, find the settings for your new subdomain. You will need to tell it which IP address to point to. Since your LB has a static public IP, you should be able to configure it as a standard A record.
- Find where to add an A record for your subdomain. Enter your LB IP Address in the IP address field and save the changes and the DNS changes take time to spread across the internet. This can range from a few minutes to several hours and try accessing your site using the new subdomain.
Or else:
Purchasing and configuring a custom domain and below are companies authorized to sell domain names. Popular options include like GoDaddy, Namecheap, Google Domains and Cloudflare Registrar.
Use the registrar's website to search if your desired domain name is available and purchase it and once you own the domain, log in to your registrar's account. There will be a section like DNS Management, Zone File Editor, Manage Domains etc...
You can link the domain to your LB IP by following below steps:
- Type: A
- Host/Name:
- Use @ or leave it blank for the root domain.
- Use www for the www subdomain. You'll likely want to point both the root domain and www to your load balancer.
- Value/Points To: Enter your LB Public IP Address.
- TTL (Time to Live): This is how long DNS resolvers should cache the information.
Save the changes and wait for the propagation and once propagation seems complete, try accessing your site using your new domain name.
I hope this has been helpful!
Your feedback is important so please take a moment to click 'Accept answer'.
If you still have questions, please let us know what is needed in the comments so the question can be answered.