Template documentationedit documentation
Use this template to trim a URL to its domain only.
Usage[edit source]
{{DOMAIN|http://example.com}}
→ example.com{{DOMAIN|https://example.com}}
→ example.com{{DOMAIN|https://www.example.com}}
→ example.com{{DOMAIN|https://www.appropedia.org/Welcome_to_Appropedia}}
→ appropedia.org
Sometimes URLs contain = signs that will confuse the parser. For such cases, make the first parameter explicit like so:
{{DOMAIN|1=https://www.youtube.com/watch?v=sEwkFKvmnes}}
→ youtube.com
Also:
{{DOMAIN}}
→{{DOMAIN|}}
→{{DOMAIN|foo}}
→ foo