spree / deployment_service_puppet

BSD 3-Clause "New" or "Revised" License
8 stars 6 forks source link

Redirect direct IP address to host #20

Open iloveitaly opened 10 years ago

iloveitaly commented 10 years ago

With the default deployment service setup sites are accessible through any domains that point to the server as well as accessing the IP directly.

I've noticed that google has started indexing my IP address directly which presents a problem on the SEO front.

Reading through the commits it seems that 8abb03a1907468670701b7186d6b0ede0503dcae reverted the www changes because the FQDN ≠ the domain that the site is hosted on, so a www.fqdn.com --> fqdn.com redirect would break for some servers.

Redirecting direct IP address access to the hostname shouldn't break anyone's configuration unless they don't have a domain pointing to their server and are accessing the site directly via IP. Although it could cause issues for people with that configuration, I think redirecting direct IP access is better default functionality.