Support Forums

Gatsby/Netlify + WP DNS Issues

Hello everyone, I’d like to start by saying thank you for any and all help you may be able to provide. I also made this post one of my last resorts - I’ve read a few articles and some of the Netlify documentation. I think my biggest issue is I do not full understand how DNS records work.

Previous Setup
Hosting, domain registered, email service, WP install, DNS records, and front end all running on the same service. My domain is setup as jonathansexton.me and my WP blog is setup as jonathansexton.me/blog

Current Setup
Front end built in Gatsby deployed with Netlify via GitHub. All DNS records except for one (it’s in a weird format that Netlify would not accept) moved over to Netlify. Name servers changed in my original hosting platform roughly 48 hours ago to the Netlify name servers.

I was able to get most everything moved over and working correctly after moving DNS records (side note - once the records were moved to Netlify I removed them from the original location…if that’s wrong I can add them back). The home url for WP is set in the DB as jonathansexton.me/blog

My Gatsby website loads as intended, my email works, but if I navigate to jonathansexton.me/blog then I get the 404 page from my Gatsby website. If I go to blog.jonathansexton.me then I get my original website which I’ll have to look into why that’s not showing the 404 page from my Gatsby website.

EDIT - it appears that anything I use in front of my domain will bring me to the old website Example → baconisyum.jonathansexton.me points to the old website so I’ve obviously missed something important with the DNS changes.

My goal is to have Netlify run the front end but keep my hosting/email/WP install with the hosting company. So this way when someone clicks the blog link on my Gatsby website it directs them to jonathansexton.me/blog

I hope I’ve provided enough info but if more is needed I’m happy to answer any and all questions. Thank you again for any and all help you may be able to provide!

Hi @js_goose,

I’m checking your DNS setup and it looks like if you really need that kind of a configuration, you’d better off by not using Netlify DNS. Here’s why:

You’re using wildcard entries to point all sub-domains elsewhere. Moreover, you’ve also added an AAAA record for the apex domain that would conflict with Netlify’s AAAA records for the apex domain. I think by the time you made this change, you had already got the SSL certificate, which you’d not have got with this configuration. Chances are, if you try to renew the certificate when it nears expiry, it would fail.

If that record is not required absolutely, I’d advise to remove it. The other 2 in the top can stay, but again - keep them only if you absolutely need to. This is the reason why any domain is able to redirect to the previous website as all of those are pointing to that IP address. If you only need it for the blog subdomain, it’s better to remove the wildcard entry and add only for the blog one.

About the actual problem, you can’t have your Wordpress website at jonathansexton.me/blog. To do that, you’d have to point the domain to your Wordpress website and the Gatsby website at the same time. However, you can use Netlify rewrites to achieve something like what you want:


Hello @hrishikesh and thank you for your detailed response!

I removed those 3 records you mentioned and now understand why any subdomain was pointing to the original website. Thank you so very much for that!

As far as the Wodpress website goes, it sounds like I would have to move my blog to a subdomain like blog.jonathansexton.me and then use a rewrite to point jonathansexton.me/blog to that?

I’d like to keep the links in tact for the blog for SEO reasons but I’m not sure this would be possible with my current setup?

Thank you again for all of your help - it is greatly appreciated!

1 Like