Solution
It can caused by many reasons but mainly, you need to ensure that the host name that you specify for generated URLs adheres to the naming convention for the valid DNS Domain name.
DNS names can contain only alphabetical characters (A-Z), numeric characters (0-9), the minus sign (-), and the period (.). Period characters are allowed only when they are used to delimit the components of domain style names.
DNS domain names cannot contain the following characters:
- comma (,)
- tilde (~)
- colon (:)
- exclamation point (!)
- at sign (@)
- number sign (#)
- dollar sign ($)
- percent (%)
- caret (^)
- ampersand (&)
- apostrophe (')
- period (.)
- parentheses (())
- braces ({})
- underscore (_)
- white space (blank)