Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Routing Internet Traffic to a Website

Updated on 2024-03-14 GMT+08:00

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.

Figure 1 Process for configuring a domain name

Procedure

  1. Create a public zone.

    Create a public zone for your domain name on the DNS console.

    1. Log in to the management console.
    2. In the service list, choose Network > Domain Name Service.

      The DNS console is displayed.

    3. In the navigation pane on the left, choose Public Zones.

      The Public Zones page is displayed.

    4. Click Create Public Zone.
    5. Set Domain Name to example.com.

      Configure other parameters by referring to Creating a Public Zone.

    6. Click OK.

      You can view the created public zone on the Public Zones page.

      NOTE:

      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.

  1. 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.
    1. On the Public Zones page, click the domain name (example.com) of the public zone you created.

      The Record Sets page is displayed.

    2. Click Add Record Set.
    3. 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.

    4. Click OK.

      You can view the added record set in the Normal state.

  2. 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.

    1. On the Public Zones page, click the domain name (example.com) of the public zone you created.

      The Record Sets page is displayed.

    2. Click Add Record Set.
    3. 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.

    4. Click OK.

      You can view the added record set in the Normal state.

  1. 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.

    NOTE:

    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.

    1. Log in to the management console.
    2. In the service list, choose Network > Domain Name Service.

      The DNS console is displayed.

    3. In the navigation pane on the left, choose Public Zones.

      The Public Zones page is displayed.

    4. 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback