0

I have the following setup:

  • Wordpress blog hosted on a VPS (ip: 123.44.55.66)
  • Heroku app live at (my-app.heroku.com)
  • Domain name bought from Namecheap (www.my-app.com)
  • Heroku domain is already setup so it correctly shows up on www.my-app.com

I want to be able to redirect blog.my-app.com to my VPS (hiding the IP and showing as blog.my-app.com) but can't seem to get it to work. I've tried setting the A record of my NameCheap DNS to point to 123.44.55.66 but that doesn't seem to work.

What additional configuration am I missing?

Henrique
  • 153
  • 1
  • 5

1 Answers1

0

Finally got it to work. Here is the final configuration:

Heroku
Add a new domain

  • Domain name: blog.my-app.com
  • DNS target: blog.my-app.com.herokudns.com

NameCheap DNS
First setup an A record:

  • Type: A

  • Host: blog

  • Value: 123.44.55.66

  • TTL: Automatic

Now setup a URL Redirect Record

  • Type: URL Redirect Record
  • Host: @
  • Value: http://blog.my-app.com

WordPress Settings (in your VPN)

  • WordPress Address (URL): http://blog.my-app.com

  • Site Address (URL): http://blog.my-app.com

Henrique
  • 153
  • 1
  • 5