Ajay Kelkar
Ajay Kelkar

Reputation: 4621

<a href ="somewebsite.com"> takes to localhost/somewebsite.com , Why?

I want to open somewebsite.com , but it goes to localhost/somewebsite.com , why its taking relative path.

Upvotes: 30

Views: 16723

Answers (1)

avpx
avpx

Reputation: 1922

Your link is missing the protocol at the start of the URL: http:// for pages not using SSL, https:// for pages securing data transfer using SSL.

If you want a link that works in either scenario, you can use // instead of the fully qualified protocol.

Upvotes: 69

Related Questions