chrisat1 Posted March 19, 2021 Share Posted March 19, 2021 I’m building my website in a home based web server. As I have started to create internal links I’m wondering what the proper way of referring to the machine. Do I use the internal up address, local host or the outside domain name when referencing the root? What is best practice here? example.com/things localhost/things 192.168.1.99/things Link to comment Share on other sites More sharing options...
Ingolme Posted March 19, 2021 Share Posted March 19, 2021 You should omit the domain altogether. Preceding a path with a slash will make it relative to the website's root: <a href="/things"> If you need to access your site from a different website you should put it on a public server. Link to comment Share on other sites More sharing options...
_brym Posted September 21, 2021 Share Posted September 21, 2021 From within pages under the same domain name, yes, do what Ingolme said. If you're hosting multiple names (virtual hosts approach), use the FQDN or fully qualified domain name (i.e. the whole thing: http(s)://www.somesite.com/things) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now