Create a Website On a Custom Domain for Practically Free With Heroku and GoDaddy

I’ve had several people ask me over the years what’s a good & cheap way to set up a static or a dynamic website on a custom domain. One of the best things about writing a blog post is that instead of having to repeat myself I can point people to a blog post that I’ve written.

Anyhow, here are the steps for creating a website on a custom domain for really cheap with Heroku and GoDaddy. The only price you would pay is the cost of the domain name. Free hosting.

1) Register a domain name on GoDaddy. You don’t have to go with GoDaddy (there are many domain registrars out there after all) but the reason why I’ve decided on GoDaddy at least for this blog post is because they allow you to modify DNS settings associated with their domains without having to pay extra. I’ve dealt with other domain registrars that don’t allow for this, which is a show stopper (as far as I know) for getting your custom domain to work with an application running on Heroku.

I happened to have a spare domain - theblameboard.com. I’m going to use this domain for the blog post.

2) If you don’t have an account on Heroku.com, go ahead and create one. During the sign-up process, when you’re asked for your Primary Development Language - I don’t know that it matters what you pick here but go ahead and pick PHP.

3) Log into Heroku and click on the Create New App button. Give your application a name. I know the field says it’s optional but I’d suggest you give it some kind of a name. I’m going to call my app blame-board.

When I open my web browser of choice (Chrome) and go to https://blame-board.herokuapp.com/ - I see the following:

4) Follow the steps on this page and install the Heroku CLI (Command Line Interface).

5) You’re now going to need to set up a Git repository on your computer which will store all of the files for this new application.

Create a new directory for your project and initialize a Git repository:

$ mkdir blame-board
$ cd blame-board
$ git init

Log into your Heroku account using the Heroku CLI and link your local Git repository to the Git repository on Heroku:

$ heroku login
$ heroku git:remote -a blame-board

6) For this blog post, I’m going to create a static site. The easiest way I’ve found to get a static site up on Heroku is to set up an application that Heroku thinks is a PHP application. To do this, create a new file index.php. This file should contain just the following single line:

<?php include_once("home.html"); ?>

The sole purpose of this PHP file is to include the home.html file which you will create in the next step. Oh, that and telling Heroku that this is a PHP application. FYI - if all you have are static files (HTML, JavaScript, CSS, etc.) in your Heroku project - Heroku won’t know how to deploy your application.

7) Create a new file called home.html. This is your “index” HTML page. I’ve added the following code in mine:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>The Blame Board</title>
</head>
<body>
  This is The Blame Board.
</body>
</html>

If you want to call your “index” HTML page something other than home.html - that’s totally fine. Just make sure that’s reflected in the index.php file.

8) In Terminal - commit your changes to your local Git repository and push it up the repository on Heroku.

$ git add .
$ git commit -m "Initial commit"
$ git push heroku master

If you see something along the lines of “…https://blame-board.herokuapp.com/ deployed to Heroku…“ you’re all set.

9) Go to https://blame-board.herokuapp.com and verify that you can see the updates:

10) Before you can assign a custom domain to your Heroku application you need to add a credit card to your Heroku account. To do this, go to: https://heroku.com/verify

No, Heroku won’t charge you as long as you stay on the their free tier. It’s a little annoying they make you add a credit card but I can’t complain too much… it’s still free after all.

As of this writing (May 2017) - according to this page - free accounts are limited to 550 hours of server time per month. When you add a credit card to your account you’re given 450 additional hours. Since there are roughly 730 hours per month the only way you can have a Heroku application running 24x7 for free is to have a credit card on your account.

11) After you’ve added a credit card assign a custom domain name to the Heroku application.

Go back to the Heroku dashboard in the browser. Click on the Settings link at the top. If you scroll down a bit, you’ll see an Add domain button. Click that. In the modal, type in the domain name you want associated with your site staring with www (this is very important!). For my example I added the following: www.theblameboard.com

If you haven’t added a credit card to your Heroku account yet you will get the following error message:

Please verify your account in order to add domains (please enter a credit card) For more information, see https://devcenter.heroku.com/categories/billing Verify now at https://heroku.com/verify

12) Now, to finish linking your custom domain to the Heroku application you’ll need to do a few things on GoDaddy. Click on the Manage DNS button for your domain.

Scroll down a bit and look for where it has Type = CNAME and Name = www. Click the pencil icon to the right and update Points to to the URL of your Heroku application WITHOUT https://www. I entered blame-board.herokuapp.com and clicked the Save button.

13) If someone attempts to go to your site without the www subdomain (theblameboard.com), you may (probably will) want to forward the user to www (www.theblameboard.com). In the GoDaddy screen - look for the Forwarding section. Click the ADD link next to DOMAIN. Set it to: http://www.theblameboard.com

You’ll probably want to leave Forward Type to Permanent (301) and Forward only instead of the Forward with masking option.

Check the Update my nameservers and DNS settings to support this change. checkbox.

Click Save.

14) In your browser, go to your domain name (eg, www.theblameboard.com) and verify that your Heroku application comes up. If you see a GoDaddy page instead, it mostly means that your DNS changes haven’t yet propagated. From my experience, this should only take a few minutes. If you’re unlucky, though, you may have to wait several hours or even several days.

15) Applications running on the free tier of Heroku will sleep if it receives no traffic in a 30 minute period (Read this for more info). Once the application falls asleep, it’ll take a little bit of time (10 seconds?) for it to wake up. One way to keep it from sleeping is to ping your Heroku application every so often (more frequently than 30 minutes). I use UptimeRobot for this. Go to uptimerobot.com and create an account and log in.

When you log in click on the Add New Monitor button. This is what my settings look like:

  • Monitor Type = HTTP(s)
  • Friendly Name = Whatever you want it to be. I’m setting mine to: theblameboard.com
  • URL = http://www.theblameboard.com
  • Monitoring interval: Anything less than 30 minutes.

And that’s it!

While there are many other ways to host your site for really cheap, something that’s as cheap and reliable as the Heroku + GoDaddy combination will be hard to come by. Plus, one of the huge advantages of Heroku is that you can have an application that runs on various programming languages (Java, Ruby, Python, Node, and more).

Important note: For my own side projects, I utilize the free tier of Cloudflare, which enables me to take advantage of their CDN as well as the ability to have my sites on HTTPS for free. I’ll write about this at some point in the future.

2023

Tips for my next trip to Korea

3 minute read

I recently returned home after a memorable 3-week trip to Korea with my parents and my youngest child. This was my 7th trip back to Korea after immigrating t...

My job search recap

3 minute read

After 4 weeks of very aggressive job searching, I was able to wrap up my job search late last week and I decided on an offer yesterday. Hooray! This is the f...

Back to Top ↑

2021

Running Effective and Efficient Meetings

2 minute read

I spend a lot of time at work in meetings. I regularly think about having effective and efficient meetings and here’s a list of things that I think are impor...

Let’s Get Rid Of Performance Rating Scales

4 minute read

Several weeks ago I wrapped up conducting employee performance reviews for the 2020 calendar year and it’s the first time that I can remember in my career wh...

My Role As “Clarity Provider”

4 minute read

Over the last several months I’ve become increasingly convinced that one of my most important responsibilities as an engineering manager is to provide clarit...

My Fitness And Health Routine

5 minute read

Something that is personally very important to me is that I stay fit and healthy for as long as possible in life. While I wouldn’t label myself a “fitness nu...

My System For Staying Organized At Work

2 minute read

Being organized is a skill I personally value and at least for me - it’s a no-brainer that being organized can help everyone do their jobs better. It was imp...

Back to Top ↑

2019

Personal Retreat

1 minute read

I drove about 2 hours west to Stockton, IL - to a place called Christ in the Wilderness (CITW), to spend a few days (Friday evening - Sunday morning) to myse...

Back to Top ↑

2018

Deconstruct

2 minute read

I recently returned home from attending Deconstruct along with a bunch of my co-workers. I thought I’d jot my thoughts down while the experience is still fre...

My Disappointment With The New Macbook Pro

2 minute read

When I started at Braintree I was given a new 2017 15” MacBook Pro with Touch Bar. It’s a really nice laptop overall and I don’t mean to sound ungrateful… bu...

A Few Weeks Into The New Job

3 minute read

I’ve been at Braintree now for almost 3 weeks and I can’t believe it’s only been a few weeks because I’ve experienced a ton of new things and have met a lot ...

Interview Process Takeaways

4 minute read

In the last several weeks I’ve had the opportunity to speak with numerous companies as a job candidate. While the experience is still fresh in my mind, I tho...

Back to Top ↑

2017

Thankful

3 minute read

I started 2017 with a ton of excitement over the opportunity to build Cappex’s very own college application product. I knew it was going to be an extremely c...

New Product Launch And Life Afterwards

1 minute read

A very large chunk of my life from the very beginning of this year until the end of July was focused on launching a new college application product. Thanks t...

Hello Is A Poor Greeting

2 minute read

I’ve done what I think is an insane amount of phone screens since December (well over 100) and in the last few weeks there’s something I’ve been noticing whe...

Hiring Is Tiring

3 minute read

Yep, hiring is tiring. Very much so.

Back to Top ↑

2016

The Christmas Gift Test

1 minute read

Ever since I started managing people several years back I’ve practiced giving Christmas gifts and a hand-written Christmas card to everyone on my team. I in...

Do Not Store Personal Data On Your Work Computer

3 minute read

I know that it’s often convenient to have your personal files stored on your work computer, especially If you’re like me and you spend a lot more time on you...

10 Lessons From 10 Companies In 19 Years

11 minute read

Since landing my first programming job when I was a junior in high school until now, I recently realized that I’ve now worked at 10 different companies, incl...

I wish DST would end

2 minute read

I really wish Daylight Savings Time would cease to exist. I can’t possibly imagine that DST would go away in my lifetime due to the sheer complexities and c...

Be Thankful

3 minute read

Last 2 weeks at work have been rough. This most recent sprint as well as the release ended up being much more difficult than what my team is normally used t...

Gradle Build Scan Rocks

2 minute read

Earlier today I attend a webinar hosted by Gradle, Inc. where Gradle Build Scan was introduced. If you’re already using Gradle as the build tool for your pr...

Compare Property Files

1 minute read

I’ve been working on a rather massive refactoring work that involves changing how Java properties files are organized. It’s vitally important that the prope...

Page Load Speed Testing

1 minute read

I decided to conduct some simple page load speed testing. I hope the following info might be of some value to some folks out there.

Replacing SSD in MacBook Air (13” mid-2012)

2 minute read

I was running low on my 13” mid-2012 MacBook Air’s SSD, which had me pretty concerned. Thankfully I recently discovered that the SSD inside this thing is re...

Simple Interview And Phone Screen Tips

5 minute read

I’ve been busy doing a lot of phone screens and interviews as of late. Actually, I’ve been doing a lot of interviewing during my time at Cappex. Since join...

Resolving Tethering Issues With iPhone

1 minute read

I spend roughly an hour and a half Monday through Friday commuting to and from work and my laptop is tethered to my phone probably 90% of the time I’m on the...

Deleting Non-empty AWS Glacier Vaults

2 minute read

I had a couple of AWS Glacier vaults that I had been meaning to permanently delete for awhile. When I tried deleting them via the AWS dashboard, I got the f...

Back to Top ↑

2015

Why Android Sucks

3 minute read

Android sucks. At least my experience of it has. Now, I’m NOT saying that Android-sucks-therefore-Apple-is-way-better. All I’m saying is that I’ve had 3 A...

Setting Up A 301 Redirect In Ruby On Rails

less than 1 minute read

I saw in Google Analytics that I’ve been getting a lot of hits on junhopark.com/index.php, which isn’t a valid page. I decided that it’d be best to set up a...

Back to Top ↑

2014

My First Album Is Now Available For Purchase

1 minute read

My first album Acoustic Worship is now available for purchase on CDBaby.com! Recording an album is something I’ve wanted to do for a very long time and I’m g...

Resolving Dns Issue On Mac Os X Yosemite

less than 1 minute read

I upgraded both my MacBook Air and MacBook Pro to Yosemite over the weekend and I saw that both my laptops were unable to connect to internal systems at the ...

A Memorable Phone Screen

3 minute read

A few days ago, I phone screened a QA Manager candidate that ended up being extremely memorable. It went something like this:

Workout Frequency Before And After Baby

less than 1 minute read

Ever since my son was born in late June, it’s been a challenge trying to find time to work out. Since I record every one of my workout sessions, I thought I’...

Merging Codebases In Git

1 minute read

A couple of weeks ago, I had to merge one codebase into another codebase and after a lot of searching for solutions on the web, I came across a solution that...

Back to Top ↑

2013

Why I Love Being Married

2 minute read

My wife and I met through a (very) random suggestion from a mutual friend 3 and a half years ago. It was suggested to us that we should meet up, get to know...

Pictures From Turks and Caicos

less than 1 minute read

Here are some pictures I took while I was in Turks and Caicos earlier this month with my wife.

My Thoughts On Commenting In Code

3 minute read

A skill that is often overlooked amongst developers and development managers is the ability to write good comments in code, which is understandable I suppose...

Hacker News By Points

less than 1 minute read

I frequent Hacker News (news.ycombinator.com) pretty often throughout the day and I realized that my eyes were almost always drawn to posts on the first page...

Playing Around With Lightroom

less than 1 minute read

I thought I’d give Adobe Lightroom a try and play around with editing some pictures. Well, here are the results.

One Less Debt

less than 1 minute read

Just paid off my student loans, which took me about 9 years and 3 months. I was planning on letting it drag on and on because of the super low interest on i...

Weekend Project Php Website On Heroku

1 minute read

I got hold of some really nice looking single page website templates earlier last week (from here) so I thought I’d go ahead and redo the website for my pare...

Three Monitor Setup

less than 1 minute read

Thanks to Plugable I’ve now got 2 monitors hooked up to my Lenovo laptop at work and I’m absolutely loving it. I definitely should’ve done this way sooner.

Teaching My Wife How To Code

less than 1 minute read

My wife recently decided that she wants to learn how to code and of course, I’ve volunteered to be her teacher. She has absolutely no experience with progra...

Stuff I’ve Been Learning

2 minute read

It’s been quite awhile since my last blog post and I had a sudden itch to write about things I’ve been learning (mostly at/through work) over the course of, ...

Back to Top ↑

2012

Moving From Subversion To Git

1 minute read

Last Thursday, my team made a successful transition from Subversion to Git. Here are some thoughts after having been on Git as a team for about a week now:

I Am Not Going To Pay You To See Your Portfolio

less than 1 minute read

Earlier today, I had a web design candidate who informed us that he would be able to provide us with an up-to-date portfolio of his design work for a flat fe...

Lessons Learned While At Lakeview Church

1 minute read

This coming Sunday will be my last Sunday at Lakeview Church. I’ve been a part of this church since summer of 2006 and I’ve been blessed to experience such ...

Hello Ruby On Rails Postmarkdown

less than 1 minute read

Decided to ditch PHP + WordPress + Lithium Hosting for Ruby on Rails + Postmarkdown + Heroku.

No More Taking Work Home

less than 1 minute read

It’s been about 6 weeks since I started working at cappex.com and while I’ve been really enjoying the work, I’ve also been guilty of bringing work home. I’v...

Job Search Tips From Personal Experience

4 minute read

Earlier this year I decided that it’s time for me to look for another opportunity outside the company. The company executives decided on being acquired by O...

Moodyshoerepair.com Redesign Launched

less than 1 minute read

I gave moodyshoerepair.com a (much needed) facelift over the course of this past week and it’s now live online. This is the first project completed on my n...

Been Awhile

less than 1 minute read

The last time I wrote in this thing was 10/22 of last year, which is also the time when wedding preparations got crazy. Well, thank God the wedding is now ov...

Back to Top ↑

2011

Taking A Breather In San Francisco

3 minute read

I arrived in San Francisco last night with Jenny and a friend of ours at around 10:30 local time to attend Jenny’s friend’s wedding which takes place later t...

Writing Good Software Simple Reminders To Self

3 minute read

One of the main purposes for keeping this blog is for me to think through and reflect upon things and to remind myself of the lessons that I’m learning. I k...

Commuting To Downtown Chicago For Work

3 minute read

My office moved from Westmont to Chicago about 2 and a half months ago and ever since then I’ve been taking the Metra train to get to work. There are some t...

Wow 7 Years Already Since Undergrad

6 minute read

This past Wednesday, I paid a visit to my alma mater (UIC) to be among the panelists to share my post-college experiences of working in the corporate world. ...

My Engagement Ring Selection Process

7 minute read

One of the main motivations behind why Jenny and I wanted to start this blog in the first place was so that this blog would (eventually at some point once th...

I Am Engaged!

less than 1 minute read

On Saturday, I got engaged to the most amazing girl I know. :) It still hasn’t quite hit me yet. To be honest, I’m guessing it’ll hit me once I get used to...

New Site Design

less than 1 minute read

I’ve been wanting to convert my site to a single-page design and after working on this on & off for the last several weeks, I’m glad to have the site fin...

Back to Top ↑

2010

Been A Long Time

2 minute read

It sure has been a long time since the last time I updated my blog. Here are the different things that have been occupying me in these last couple of months:

Excellent Book On Web Usability

1 minute read

One of the things I’ve been enjoying about work since I made the switch last November is being able to get my hands dirty with front-end web development and ...

Software Development As Missional Philanthropy

4 minute read

For some time now I’ve been really interested in going overseas for the purposes of doing missional philanthropic work. And by “missional philanthropy” I am...

User Interface Design 090

7 minute read

Do you remember how in college there were classes that were actually below 100-level? The classes that some folks were required to take but they didn’t coun...

If You Write Code Write Tests

less than 1 minute read

So… I’m scrounging around the internet looking for some TDD-related tidbits and I came across the following at www.artima.com.

Making The Most Out Of Band Rehearsals

8 minute read

Band rehearsals–some love ‘em, some hate ‘em, but there’s no denying that they are very much necessary, even for bands that are comprised of phenomenal music...

Lessons Learned From Being In The Shoes Of QA

5 minute read

At work we have a huge product release coming up very soon. There are a lot of new features to the application, which means that there has been a ton of cha...

New Recording - Gone From The Portrait

less than 1 minute read

Over the weekend I started re-recording a song which I had written a few years back. Vocals, acoustic guitar, electric guitars, bass, keyboards, drums-via-k...

New Music - Lullaby (Instrumental)

less than 1 minute read

After lunch @ Sweet Tomatoes with some friends I came back home and took a much needed nice, (too) long nap. Fast forward a few hours and it was around 11: ...

Done

less than 1 minute read

Yet another rendition of junhopark.com is done… at last! I decided to forsake my old Blogger posts since it’s been quite awhile since my last blog update an...

Back to Top ↑