Wednesday, 10 September 2014

SharePoint custom domain name


Steps:
Open PowerShell (Start-->All Programs-->Microsoft Online Services-->
Right click on Microsoft Online Services Module for Windows PowerShell and click Run as administrator.
run $cred=Get-Credential
run Connect-MsolService -Credential $cred
Get domain Name using this command: Get-MSolDomain
Add new custom domain name:
new-MSolFederatedDomain -domain www.myprojectname.com

Now you can get all domain names: Get-MSolDomain
You should find your domain name also.

Now create a site collection and assign www.myprojectname.com to that site collection.

Go to Central Admin
Click on Site Collections
Click New
Click Public WebSite
Enter Title.
Under WebSite Address: Select your domain name. Ex: www.myprojectname.com
Ok

Create a CNAME record.
Select your domain name.
Now click DNS Information and find what is suggested to add as CNAME then go to your domain manager and add a CNAME record in the DNS.