I need to have one CMS or one site, that can show multiple domains.
How can this be done?
Big thanks in advance.
X
I need to have one CMS or one site, that can show multiple domains.
How can this be done?
Big thanks in advance.
X
Hi there! To achieve a single CMS/site for multiple domains. Wix’s Multisite feature or Wix Code’s API can connect domains to a single CMS, and to explore reverse proxy/DNS setups.
In case that you don’t get it cleared I can her you with it.
Message me to discuss the best approach for your specific needs and I’ll guide you through the process - I’m here to help!"
Email: hammedbabalola23@gmail.com.
Can you just tell me how it’s done here? Thxxx
Yes, are you here?
I will provide the solution right away.
To achieve a single CMS/site for multiple domains, consider Wix Multisite feature or Wix Code API to connect domains to a single CMS, or explore reverse proxy/DNS setups for custom configurations. If you need help determining the best approach for your specific needs, message me and I’ll guide you through the process to ensure a seamless setup - let’s get started!
If you don’t get it, I can help you…
That’s
Hey @kreativthold!
It’s possible to connect multiple domains - this article outlines the process - Connecting Multiple Domains to One Wix Site | Help Center | Wix.com
However, the additional domains will redirect to your primary domain (not show as that secondary domain in the browser).
Hope this helps
Nope, I want one CMS for multiple domains
Not sure I’m following - like one CMS that will be used to display data across multiple sites?
Jup yes jup yes jup yes
hello. I have been on wix for several years and I need to translate my site into several languages but assign each language to a domain, like spanish to a domain in .es, french to a domain in .fr, etc
I see that wix only manages subdomains and subdirectories but not multidomain. Is there a translation application that allows you to translate a site and assign each language to a domain with good SEO, like having different title and description tags from one language to another and from one homepage to another.
If I create separate sites, how do I generate automatic translations of the sites from the main site in English and how do I have a single product catalog that synchronizes on the other sites, I am talking about product sheets and stocks?
thank you
Hi,
Thanks for reaching out! I understand you’re looking to connect multiple domains to a single Wix site, which is a great way to manage several web addresses under one platform.
While Wix allows you to connect multiple domains to one account, it’s important to know that Wix currently doesn’t support using multiple domains with different content on the same site. That means you can’t have separate content for each domain through Wix’s built-in settings. However, you can connect additional domains to point to the same Wix site. This way, visitors can access the same content using any of the connected domains.
Here’s what you can do:
If you want each domain to show different content (e.g., a CMS that displays specific content for each domain), you’d need to set up separate sites for each domain. You could then link them together through the navigation or create specific redirects based on your needs.
For more detailed guidance on connecting multiple domains, be sure to check out the Wix support article here: Connecting Multiple Domains to One Wix Site.
More answering the original question, of multiple sites using a single CMS
You should be able to use the http-function.js file in the backend and velo code function in that to return the data from the cms to any authorised fetch request (set the permissions on the CMS to expose it correctly )
Then fetch the data using wix fetch api in the other sites ( in their back end)
You should be able to update the local cms from there to reflect that data and use it on the local site. Also have a look at the wix realtime API which give you the ability to do live updates to the client side when cms dat is changed
Whaaat. I’d love to learn more about this
The http-functions doc explain how to set up the code in the backend for external requests.
An example to return cms data. ( note any info I am returning here in my case, would be Public anyway, so I do not worry about any privacy issues., there are steps to only accept requests from certain domains etc, i.e Access-Control-Allow-Origin. and probably other methods, for my use case, at least at the moment I allow all)
Read the docs for better understanding.
On a site that holds the main cms.
import { ok, notFound, serverError } from "wix-http-functions";
import wixData from "wix-data";
export function get_data(request) {
let options = {
headers: {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*", // Allow any origin
"Access-Control-Allow-Methods": "GET, OPTIONS", // Allow necessary methods
"Access-Control-Allow-Headers": "Content-Type, Authorization", // Allow necessary headers
},
};
return (
wixData
.query("marquees")
// .eq("message", request.path[4])
.find()
.then((results) => {
if (results.items.length > 0) {
options.body = {
items: results.items,
};
return ok(options);
}
options.body = {
error: `'${request.path[0]} ${request.path[1]}' was not found`,
};
return notFound(options);
})
.catch((error) => {
options.body = {
error: error,
};
return serverError(options);
})
);
}
On another site where you want to fetch the data to…
Either in the backend or frontend depending on your use case. you can use a normal Wix Fetch(), you will need to parse the data as needed…
import { fetch } from "wix-fetch";
$w.onReady(function () {
$w('#button1').onClick((event) => {
fetch("https://mysSite.com/_functions/djdata", { method: "get" })
.then((httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
} else {
return Promise.reject("Fetch did not succeed");
}
})
.then((json) => console.log("The first entry's message::: ",json.items[0].message))
.catch((err) => console.log(err));
});
})
If done in the backend you should be able to use the realtime.
Read the docs.
Hey, thanks a lot. Got any links to the docs? Especially the part about adding and receiving data from a different site.
Like, what would the backend code / modules look like?
@kreativthold In my post above my last one, there are links to some docs. Wix Docs in the main are not hard to find, and give some code examples.
Please re read what I have said and show above, I have already given some code examples to get you started and adapt to the backend if that’s what you need…
unfortunately I can do it all for you especially if it seems you are not going over what I already posted.!.
Alright, I’ll go over it some more and set it as the solution for now. Thanks Mark