If you want to use the domain_access module for content staging it's important that the same domain configs exist on both sites but with a different domain. Let's say you have the following domain structure for your stage domains and prod domains:
To allow content from your prod instance to have their equivalent of the domain from stage assigned, you have to create a domain config for every domain with the same ID on both environments. For example:
Stage Domain | Config ID | Prod Domain |
---|---|---|
stage.example.com | example | example.com |
stage.example2.com | example2 | example2.com |
That way if a content is assigned to e.g. "stage.example.com" on stage and it's pushed to production it will get "example.com" assigned as it's domain.
Please note that if you are using domain access in Drupal, you will pay per domain per production site. So if you have 2 production sites with 5 domains each, you will be billed for 10 licenses. To avoid costs for unused domains, please ensure that you either delete or deactivate domain configs on your production site if you don't use them.