Running your Jekyll blog on a Local Server

less than 1 minute read


I recently hit a stumbling block when trying to serve my Jekyll blog locally. After I ran the command ‘bundle exec jekyll serve’, I noticed that my local server would spin up, but the links would all point back to When they should be pointing to

The fix is quite simple:

Open your _config.yml file and add the following line (replace my domain name with yours):


Next, at your terminal prompt enter the following command to serve your site locally:

	bundle exec jekyll serve --baseurl ''

This simply overwrites the baseurl value with no value. Now simply navigate out to and your links should be pointing to the local version instead of your github page or custom domain.

Note: There are other ways that you can maintain two .yml files (one for development and one for production) located here.

I hoped this helped!

Leave a Comment