Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fix for isURL validator, when protocol is followed by a www #429

Closed
wants to merge 1 commit into from

Conversation

GEMI
Copy link

@GEMI GEMI commented Aug 27, 2015

Hey, hope you can merge this is, because we have issues in our app with incorrect URL's. Thanks!

@chriso
Copy link
Collaborator

chriso commented Aug 27, 2015

Sorry, I can't merge this; this is not correct. There's nothing special about www. versus any other subdomain. For example, http://www.com/ is a valid URL, resolves correctly and is a real parked website (try it!).

The example you gave in #428 is a valid URL, but the .uk TLD seem to have disallowed registration of that domain. Checking this is outside the scope of the library. If you need extra validation, I'd suggest you try looking up the DNS entry (A) to see if the domain resolves, and then possibly visiting the site to see if it exists or not. If I visit http://www.uk I get redirected to a http://error.talktalk.co.uk page telling me that the domain does not exist. The fact that visiting http://www.uk in the browser takes me to a real page is more proof that it's a valid URL 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants