How to point multiple domains to the same website that is not the main website in Odoo 14 - odoo-14

I use a multi website setup in Odoo 14 and I want to have multiple domains pointing at one domain that isn't the main domain.
example
I have 2 websites
website A is the main website, everything that isn't part of a known domain should end up here
website B is a secondary website. I want multiple domains to point to this domain. currently in Odoo there is only one field where I can put a domain..
is there any syntax with which I can put multiple domains into the domain field or Is it possible to seperate them f.e. using semicolons or commas?
example image - this is where I need to put multiple domains

Related

how to apply 1 domain for more than 2 servers with specific destinations

I read this 2 years old post about sharing domain for 2 or more domains
I wondering if it is possible, and how to do it, to share 1 domain (www.domain.com) for 2 different servers and filter in apache the request based on a regex or so.
ex.
user is browsing to www.domain.com
site is delivering images
if the image file is starting with a 'number' apache is requesting the content from server A
if the image file is starting with a 'letter' apache will request the content from server B
I do want to know if it possible to setup it mainly from DNS records without involving apache too much.
Thanks much
You shouldn't do so. You should create subdomain, pointing to different server in DNS, to divert traffic. Example: www.example.com serving images from static.example.com

How do I allow customers to show a portion of my site at their Domain?

I have a website that contains company profiles. These profiles have many pages within my site like products, services, etc. Some of my users would like to use their profile on my site as their webpage.
eg. going to www.mycustomerswebsite.com loads their profile on my site, but doesn't redirect to my url.
I'd like to allow them to do this simply by pointing their DNS at my server. The behavior I'm looking for is similar to what one can do on hosted wordpress. I'm running Apache as my web server on Linux CentOS.
What are my options for setting this up?
With just apache serving static files, you create a wildcard virtualhost as per:
http://httpd.apache.org/docs/2.0/vhosts/mass.html
If (as is more likely) we are talking about a script generating pages on the fly, that script should be written to inspect SERVER_NAME to determine what content to produce - pseudocode:
names = {
'customer1.example.org': 1,
'customer2.example.org': 2,
};
if ($ENV[SERVER_NAME] == 'www.example.com') {
regularHome();
}
else {
produceHome(names[$ENV[SERVER_NAME]]);
}
Either way, you must make an association between mycustomerswebsite.com and your name for the same customer - perhaps they must input their domain into their settings on your site or perhaps you already have their domain set up.
After all that (and probably most difficult) is to get them to make a DNS change - they are the only ones who can do it - so that www is CNAMEd to your host. You might want to create a special host record "customers.example.com" or some-such strictly for this purpose. Create some documentation for your customers similar to wordpress's:
http://en.support.wordpress.com/domain-mapping/map-existing-domain/#instructions-for-mapping-an-existing-domain

CPanel: How to use two different domains in one hosting account, keeping url?

Right now there's two different accounts, with both domains having each their own hosting account,
for similar website (let's say domain.fr and domain.co.uk)!
I've merged the two websites into one (currently hosted as 0.0.0.0/site/language ),
making it multilanguage! The script just need a prefix on root,
such as like www.domain.com/english/ or www.domain.com/french.
This works as expected, if only a domain is used, but I would like to use two different domains (domain.fr / domain.co.uk).
So, I want to catch the current request URL, to know what language to display. What's important is that, the request urls keep persistent.
For example,
http://domain.co.uk/language_english
http://domain.co.uk/language_english/somepage.php
http://domain.co.uk/language_english/somedirectory/someotherpage.php
While,
http://domain.fr/language_french
http://domain.fr/language_french/somepage.php
http://domain.fr/language_french/somedirectory/someotherpage.php
This two domains are actuall hosted in same hosting account, let's said
127.0.0.1/language_variable/somepage.php
Any suggestions or good practices?
If I got your question , It's a feature in Web Hosting's solution which is called Addon Domains and depend on hosting company that how many Addon Domain they let you to put into one account !

Is sub-domain better or sub-folder?

I have a classifieds site and I want to know whether creating subdomains or sub-folders is better, as I am in state of confusion.
If we need to take sub-domains then what are the benefits which we can get from sub-domains?
If we need to take sub-folders then what are the benefits we can get from them?
If we create sub-domains then Google considers sub-domains as individual domains and would show only 2 results per page.
So please clear my doubts and let me know which one is better.
Search engines will treat subdomains more like separate domains, so it many cases using sub-folders is the way to go, so that you are not spreading yourself to thin.
using both is a bad idea, as search engines will try to index both, and one will get flagged as duplicate content.
Here's an article from SEOMoz explaining it in more detail:
http://www.seomoz.org/blog/understanding-root-domains-subdomains-vs-subfolders-microsites
Personally, I go off the logic that a subdomain is a different application / site owned by the same company. A subfolder is part of the same application / site.
It is probably better for your PageRank / search engine listings if you have 'one-big-site', rather than lots of different loosely coupled domains. If the content of the sites is distinctly different, e.g. a personal site might have a gallery or blog subdomain which keeps the content distinctly seperate from the main site - then it probably makes sense for a subdomain, otherwise, I'd stick with folders.
p.s. Side note, dunno if this is important, but web-browsers only open two connections at once to a website when downloading the different files that constitute a page. So there is a reason for a subdomain in this instance where it actively speeds up (though, on a fast site, minimally) the page load time.
It depends on what content you want to create subfolder/-domains for.
Is it related to your original site? Then you should definitely use sub-folder as this belongs to the same domain. It's much better for the link juice to spread if you use sub folders.
As for the PageRank, it's better to use subfolders.
Subdomains is considered as a new site. Subfolders is not, and will get better rankings if your original site is powerful.
You can use both subdomains and subfolders if you like, but don't forget to use the canonical-tag to avoid duplicate content.
Two relevant links that explains this further:
http://www.searchmarketingstandard.com/when-to-use-subdomains-vs-subfolders
http://www.searchenginejournal.com/subdomains-or-subfolders-which-are-better-for-seo/6849/
Why not both? Have demandb.com/foo and foo.demandb.com go to the same place.
Technically, a subdomain is a different server. The company I work for has a domain with several subdomains where every subdomain is located on a different (virtual or real) computer/server. That way, if one of them crashes, the rest just keeps running.
From a developer's perspective, a subdomain would force everything within the subdomain to be a different application while in a subfolder, the subfolder and subsubfolders could be part of the application in the root folder. When I create web applications, those web applications are often tested first on a test server in a subfolder. Once they make it through the tests, they are moved to the root of their own subdomain.
When two subfolders are related to one another, they're often part of the same application, thus it would be better to keep them in their own subfolder so they can share cookies and sessions more easily.
2 comments:
Use sub folders if you need SSL- then you only need 1 basic certificate for the root
If you use both, make sure you redirect 301 one to the other. That will avoid the search engine duplication issue, but would still be problematic for SSL in certain situations.
If your site can be easily partitioned by the subdomains and each subdomain can operate independently then do it! You can then easily scale out your application by deploying different servers(or clusters) for each subdomain.
Examples:
Craigslist: by region(seattle.craigslist.org, sfbay.craigslist.org, etc)
Livejournal: by community/user
Technically, you can do this with folders, but it requires a web proxy farm, whereas subdomains can be done with simple DNS entries.
its also depends on your needs whether u want separate login system for sub domains, because it wont be possible is you are using sub-folder. Sub-folder share same session.
For sub domains you have to set shared cookie for all domains.

1 domain two separate applications

http://www.one.com
and
http://www.one.com/uk
www.one.com is the main site, but there is a UK version of this site which ideally needs to be in a subdirectory (/uk).
How do set IIS up to allow me to have multiple sites under one domain?
Or can I have two separate sites and use ISAPI_rewrite to point www.one.com/uk to read from another site but keep the url www.one.com/uk?
Could you not just setup a virtual directory that points at the second application? Assuming you are using asp.net, you'd have to make sure there was no overlap in the web.config files (you may have to remove/add some elements) but a virtual directory would be a simple solution I'd think.
You could just set up a virtual directory called "uk" inside the main site for "www.one.com", and place the UK version of the application inside it. You'll need to make sure that the application inside it either uses relative links (to make sure it does not stray out into the main application), or it's absolute links include the /uk/ prefix.
Alternatively, have you considered using two hostnames? E.g., www.one.com for global/ US/ non-UK, and uk.one.com for the UK site?
Just setup a virtual "/uk" directory. http://support.microsoft.com/kb/172138
You can do it with ISAPI_Rewrite with the proxy if you needed to use multiple domains but I would recommend if you had to use multiple domains doing it the easy way by making the second site : uk.one.com using host headers. http://www.visualwin.com/host-header/
Alternatively you could set up subdomain like uk.one.com and redirect user there if he is from uk. It's easier.