什麼是 DNS 和名稱伺服器?連線域名與伺服器
當你開始建設網站時,一定會遇到“DNS”和“名稱伺服器”。理解它們是什麼以及如何運作,是成功運營網站的基礎。
本文將以初學者也容易理解的方式說明這些基礎知識,並提供順暢運營網站所需的知識。
The Complete Comparison of 32 WordPress Hosting Services: Best Picks for Individuals, Businesses, and Overseas Use

當你想著「我想開始使用 WordPress」並搜尋「WordPress 推薦」時,你會看到各式各樣的文章,從個人方案、企業與小型企業選項,到海外伺服器和便宜伺服器都有。老實說,
- which site should I look at?
- I want to choose a server in a simple, easy-to-understand way.
- Tell me how to start WordPress right away.
don’t you feel that way? That is why this article carefully introduces handpicked recommendations from 32 hosting services for individuals, companies, domestic use, and overseas use. It is explained by the SEO lead of an app development company that uses hosting services every day.
什麼是 DNS?
DNS,也就是 Domain Name System,是一種可稱為網際網路通訊錄的系統。
It converts the domain names we can easily remember into IP addresses that computers can easily understand. Because of this process, you can access a site simply by entering its website address into a browser.
什麼是名稱伺服器?
名稱伺服器是 DNS 系統中的伺服器,用來保存網域名稱與 IP 位址之間的對應關係。
購買網域後,名稱伺服器對該網域在網際網路上正常運作是不可或缺的。因此,全世界的人都能找到你的網站。
如何設定 DNS 和名稱伺服器
註冊域名
建立網站的第一步,是註冊你想要的網域名稱。
指定名稱伺服器
註冊網域後,你需要為該網域指定要使用的名稱伺服器。申請租用伺服器時,主機公司可以提供名稱伺服器資訊。
調整 DNS 設定
最後,將網域名稱對應到 IP 位址。這包括設定 A 記錄與 MX 記錄。
設定 A 記錄
A 記錄,又稱 Address Record,是用來將網域名稱連結到 IP 位址的紀錄。例如,它可用於把你網站的網域名稱對應到網頁伺服器的 IP 位址。
- Access the DNS control panel: Log in to the control panel of the registrar managing the domain or the hosting service.
- Go to the DNS settings: Move to the DNS-related settings section, such as “DNS management” or “DNS settings.”
- Add the A record: Choose the option to add an A record and enter the required information.
Host name: Usually the domain name or subdomain name, such as www.
IP address: Enter the IP address of the server hosting the website. - Save the changes: Save the settings and apply the changes.
設定 MX 記錄
MX 記錄,又稱 Mail Exchange Record,是用來指定透過網域名稱接收郵件時所使用的郵件伺服器的紀錄。
- Access the DNS control panel: Again, log in to the control panel of the registrar or hosting service managing the domain.
- Go to the DNS settings: Move to the DNS-related settings section.
- Add the MX record: Choose the option to add an MX record and enter the required information.
Priority: If you configure multiple mail servers, this number determines which server receives mail first. The lower the number, the higher the priority.
Mail server address: Enter the domain name of the server that handles the mail, such as mail.example.com. - Save the changes: Save the settings and apply the changes.
注意事項與費用
傳播時間

更改名稱伺服器或 DNS 設定後,這些變更需要一些時間才會反映到整個網際網路。一般來說,最好預留幾小時到約 48 小時。
安全性
由於也存在 DNS 劫持的風險,因此選擇值得信賴的服務很重要。
費用

註冊網域通常每年會花費數百到數千日圓,視網域而定。名稱伺服器服務通常包含在租用伺服器合約中,但如果使用專門的 DNS 服務,可能會產生額外費用。
總結
DNS 和名稱伺服器是經營網站的基礎部分。
學習這些知識後,建立和管理網站會順暢許多。希望這篇文章能對你運營網站有所幫助。