WordPress Multisite pretty links stop working when changing dns of a network site to point to its own domain

I’m having an issue with the permalinks of my multisite. When my team works on creating network sites that are part of one multisite, they use pretty links, something like /about-us.

When we have said network site url pointing to a subfolder of our own multisite like so:


it works perfectly fine.

However as part of our process, once the network site is completed and we need to launch it to go live for our client to its own domain address like:


suddenly pretty links stop working and every internal URL begins giving us 404 errors.

I can fix this by changing our permalinks from any of the pretty link options to plain, and the links in the menu will be fixed, but obviously every spot where our designers linked to a page within the body of the content on the site by linking to a relative /about-us for example, it breaks.

I’ve been googling around and I can’t seem to find anything about how to fix this specific problem

I’m wondering if it has something to do with the fact that in the wp_blogs table, the path column gets updated from network-site to / ?

for example, before going live the table might look like:

domain          | path
multisite.com     | /network-site/

Then after going live it looks like:

domain           | path
network-site.com    | /

I assume that is the case, but I am not sure how to solve this. Does anyone have any advice? Thank you!