Redirecting WordPress blog content to Netlify is not working as intended

Hello All,
I have a primary Reactjs site hosted on Netlify and I have a Wordpress site that is hosted using Elementor.
The Netlify site name is The blog is on the subdomain of

The goal is to have the WP site and its content be redirected to the primary domain with the /blog path.

The below is my current .toml file. I have tried reversing the to and from sites to having my external site be the from site, but when I do that I just get a 404 page when trying to access the blog.

In the code below the issue is that It goes to the /blog site just fine, but when I click on any article it opens the article in a new tab under the subdomain not the new path.


    command = "yarn run build"
    publish = "/build"

  from = "/blog"
  to = ""
  status = 200
  force = true

  from = "/blog/* "
  to = ""
  status = 200
  force = true

    from = "/*"
    to = "/index.html"
    status = 200

    for = "/*"
        test-it = "true"
        cache-control = "no-cache"

@augdog978 While not what you’re trying to do, it is all working exactly as I’d expect.

The issue:

Is because Netlify’s system only proxies the destination site to the path.
It doesn’t change anything about the content.
It doesn’t have any control over redirects on the other site.

The URL’s on the site are absolute and have target="_blank" specified.

So they’ll open that URL in a new tab.

@nathanmartin Thank you for the reply!

That makes sense, so using an * and :splat wont work with netlify? Is that what you are saying?
Would removing target_blank have a different affect?

That’s not at all what I’m saying.

The wildcard and splat are provably working.

They’re why this URL:

Serves the contents of this URL:

However you’ll find that when accessing the same page via this URL (with no trailing slash):

That you end up on
It’s due to a 301 redirect being sent by the Wordpress site.


It’s probably related to it enforcing trailing slashes.

Removing the target="_blank" would have the usual effect.
It would mean that the links open with their default behavior.

@nathanmartin Thank you for the information. I am still lost on what I need to do in order to get the functionality im looking for which is having content be served under the /blog URL and not the subdomain.

I tried removing the slah via a custom structure in WP and that did not work.

Thank you for your time and help!

There isn’t anything else to do on Netlify’s side of things.

You need to make appropriate changes to the Wordpress site, so that it matches what you want.

E.g. If the goal is to keep the users on the Netlify site, you could change the links on the Wordpress site.
Loads the page correctly, because the Netlify proxy is working.

But as previously mentioned, the article links on the Wordpress site are absolute, the first one is:
So clicking it causes the browser to go to the Wordpress site.

If the article links on the Wordpress site were instead root relative:

Clicking it would stay on the Netlify site, and you wouldn’t have a problem:

I can’t give you specifics for how to modify your Wordpress site though, you’d need to google around or seek assistance for that elsewhere.

@nathanmartin That helps tremendously. Thank you!