大网数据广告活动
网站运营与故障问答

Why can I access a website through IP address but not by it's domain name?

· 52CE 我爱测

I'm using CentOS, LAMP and Wordpress.org I have added and edited a virtual host on the apache server. For servername I put the hostname that is output when I typed the command hostname. Now I'm accessing my website by typing ipad…

问题原文

原帖链接 · Voltic · CC BY-SA 3.0

I'm using CentOS, LAMP and Wordpress.org I have added and edited a virtual host on the apache server. For servername I put the hostname that is output when I typed the command hostname. Now I'm accessing my website by typing ipaddress/wp-admin. But I want to access it through the domain name. Doing some research I found out that I have to update my domain’s DNS records. How do I do that or is there another way to do it?

For iptables I only enabled port 80 or http access.

已采纳解答

原帖链接 · zigojacko · CC BY-SA 3.0

You'll need to create an A record to point the domain to the servers IP address.

  1. Log in to your domain registrar control panel or wherever your DNS records are controlled.
  2. Create a new A record.
  3. Set the domain.com. as the host and the value as the IP address.
  4. Allow up to 24 hours for the DNS record to propagate.

For example:-

  • Host: clubnetsem.com.
  • Type: A
  • Value: 149.255.56.109

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2014-03-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。