Elias Benevedes
Elias Benevedes

Reputation: 391

Opening a link on my website doesn't work

In my website, I have a link that I'm trying to get work. I have a link that follows the normal format, a href, with www.youtube.com as the target link, and target=_blank at the end. When I click on the link, the website that hosts my website comes up with an error message. When I copy and paste the actual link, I get my webpage with that at the end:

www.example.com/www.youtube.com

Which is not what I want! I want it to take the user straight to www.youtube.com in a new tab. Any help?

BTW, the actual code I had entered wasn't working, so if anyone wants to see the code, give me your email in the comments and I will send it to you. Thanks for the help!

Upvotes: 0

Views: 2478

Answers (1)

Daedalus
Daedalus

Reputation: 7722

The problem, as @Interrobang has stated(although not in so many words), is your complete lack of http:// at the beginning of the url. Leaving this part out, or more importantly the //, makes the browser treat the url as relative to the site, rather than another site altogether.

Upvotes: 5

Related Questions