+ Start a Discussion
Andrew ParrottAndrew Parrott 

My Domain error in Trailhead Course - Working with Custom Lightning Components

I am trying to set up a custom domain in a delevoper edition of Salesforce in conjunction with a trailhead course.  When I click the Check Availability button, I always get the same message.  I have tried many different domain names and always get the same message.  The error is as follows:

Your domain name can include up to 40 characters, numbers, and hyphens. The name can't begin or end with a hyphen.

Any suggestions?  My Domain name does not start or end with a hyphen.  See screen shot below

User-added image
Best Answer chosen by Andrew Parrott
rizwan ahmed 16rizwan ahmed 16
I think the error is comming because your using  underscore '_' in domain name.Use hyphen'-' insted of underscore and try it.
mark as best answer if it works thanks 

All Answers

rizwan ahmed 16rizwan ahmed 16
I think the error is comming because your using  underscore '_' in domain name.Use hyphen'-' insted of underscore and try it.
mark as best answer if it works thanks 
This was selected as the best answer
Wade Lovell 4Wade Lovell 4
I agree with rizwan. Remove the underscore. If you want separation in the name replace the underscore with a hyphe, "alp-medave".
Andrew ParrottAndrew Parrott
Thanks.  That did the trick