Routing Internet Traffic to a Website
Scenario
After you register a domain name and set up a website, you can configure record sets to map the domain name to the public IP address of the web server so that end users can use the domain name to access your website over the Internet.
For example, you have already built a website on a web server with a public IPv4 address bound. To allow end users to access your website using domain name example.com and its subdomain www.example.com, perform the following operations:
- Add an A record set that maps domain name example.com to the public IP address of the web server.
- Add an A record set that maps subdomain www.example.com to the public IP address of the web server.
Prerequisites
- You have registered domain name example.com.
- You have deployed a web server and obtained its public IP address.
Process Flow
Figure 1 shows the process for configuring a domain name for your website.
Procedure
- Create a public zone.
Create a public zone for your domain name on the DNS console.
- Log in to the management console.
- In the service list, choose Network > Domain Name Service.
The DNS console is displayed.
- In the navigation pane on the left, choose Public Zones.
The Public Zones page is displayed.
- Click Create Public Zone.
- Set Domain Name to example.com.
Configure other parameters by referring to Creating a Public Zone.
- Click OK.
You can view the created public zone on the Public Zones page.
You can click the domain name to view SOA and NS record sets automatically generated for the zone.
- The NS record set defines the authoritative DNS servers for the domain name.
- The SOA record set identifies the primary authoritative server for the domain name.
- Add an A record set to the second-level domain name.
Add an A record set to the created public zone to allow access to your website using example.com.
- On the Public Zones page, click the domain name (example.com) of the public zone you created.
The Record Sets page is displayed.
- Click Add Record Set.
- Configure the parameters as follows:
- Name: Leave this parameter blank. The DNS service automatically considers example.com as the name, and requests are routed to example.com.
- Type: Retain the default setting A – Map domains to IPv4 addresses.
- Value: Enter the public IP address of your web server.
Configure other parameters by referring to Adding an A Record Set.
- Click OK.
You can view the added record set in the Normal state.
- On the Public Zones page, click the domain name (example.com) of the public zone you created.
- Add an A record set to a subdomain.
Add another A record set to the created public zone to allow access to your website using www.example.com.
- On the Public Zones page, click the domain name (example.com) of the public zone you created.
The Record Sets page is displayed.
- Click Add Record Set.
- Configure the parameters as follows:
- Name: Set it to www, indicating that the subdomain to be resolved is www.example.com.
- Type: Retain the default setting A – Map domains to IPv4 addresses.
- Value: Enter the public IP address of your web server.
Configure other parameters by referring to Adding an A Record Set.
- Click OK.
You can view the added record set in the Normal state.
- On the Public Zones page, click the domain name (example.com) of the public zone you created.
- Change the DNS server addresses.
The DNS service provides authoritative DNS servers for domain resolution.
After you create a public zone, an NS record set is generated, which specifies the DNS servers provided by the DNS service.
If DNS server addresses of the public domain name are not the same as those in the NS record set, the DNS service will not be able to resolve the domain name. You must change the DNS server addresses of the domain name on the registrar's website.
Generally, the changes to DNS server addresses take effect within 48 hours, but the time may vary depending on the domain name registrar's cache duration.
Query the DNS server addresses provided by the DNS service.
- Log in to the management console.
- In the service list, choose Network > Domain Name Service.
The DNS console is displayed.
- In the navigation pane on the left, choose Public Zones.
The Public Zones page is displayed.
- Click the domain name of the public zone you created.
Locate the NS record set and view the DNS server addresses under Value.
Change the DNS servers.
Log in to the domain name registrar's website and change the DNS server addresses to those provided by the DNS service. Refer to the domain name registrar's documentation for detailed operations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot