Template:Get hostname

This template returns the hostname for a given URL.

Examples:
 * http://www.google.com/ =
 * http://www.google.com =
 * HTTP://WWW.GOOGLE.COM =
 * http://wiki.minnestar.org/w/index.php?title=Template:Get_hostname&action=edit =
 * http://www.youtube.com/watch?v=NA9F357Q4KU&list=PLItWkVuyxHmVWdCnBXDFgPMA5o5eEkjTQ =
 * https://www.youtube.com/watch?v=NA9F357Q4KU&list=PLItWkVuyxHmVWdCnBXDFgPMA5o5eEkjTQ =

This template will take either the first argument, or a named parameter called URL. Note that if you pass it a URL with an equals sign you must use the named parameter. For safety, it would be recommended to always use the named parameter. Also beware that a pipe character will cause problems in the template call so you should check for a pipe in the URL before calling this template.