While using Hexo to set up a github.io blog, the default domain name is [your-github-username].github.io. To use a custom DNS for your personal blog, Github requires you to create a file named CNAME in master branch of your repository. Since Hexo3, if you simply added the CNAME file manually it would be overwritten at deployment time. So you could use Hexo plugin: hexo-generator-cname.
Add hexo-generator-cname to plugins in _config.yml.
##Configure domain name in _config.yml
Go to _config.yml file, and find the variable url. Configure your custom domain name like below.
When you run
Then you need to login to your DNS provider and create a DNS CNAME record pointing hostname www to your-github-username.github.io. Here is a DNS provider I used before wanwang. It will take a couple hours to replicate default domain name with the custom one.