问题原文
原帖链接 · Mike · CC BY-SA 3.0
I plan to have 2 separate domain names pointing to the same Apache installation with WordPress multi-site.
I can set virtual hosts correctly for each domain, no problems. I can have both domains point to the same host, no worries.
Currently I have a redirect for all traffic hitting the web server IP address to my initial domain:
<VirtualHost *:80>
<Directory "/share/Web/WordPress">
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ServerName 1.1.1.100
Redirect / https://www.example.com/
</VirtualHost>
What is the best practice for redirecting the IP address when 2 domain names point to the same IP?
I thought about creating a generic 404 page and having that displayed when hitting the IP address. But would this hurt my SEO on both sites?
How do shared hosting companies redirect HTTP traffic based on an IP address? Do they point back to the parent company, or something else? Perhaps this is a non issue all together?
So just to be clear: what is the best practice for redirecting the IP address of a web server when it hosts multiple domain names?
已采纳解答
原帖链接 · Mike · CC BY-SA 3.0
The answer is in the comment:
Hosting companies that offer shared accounts typically have a number of sites hosted all on the same IP address using virtual hosts as you've done.. They point the IP address either to a default server page, default site, or an error page. In either case, that does not affect any other site SEO-wise.
For clarity redirecting the IP to an error page, 404 or another landing page is the best practice. None of which will negatively affect SEO of any domain hosted.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
