Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 14154
Joined: 30 Sep 2006, 03:37

Can I use multiple domains for the same X3 website?

04 Aug 2016, 01:29

Question

Can I use multiple domains that point to the same Imagevue X3 website?
Answer

Technically yes it is possible, but NO you really need to avoid this. Since Imagevue X3 license authorizes per domain, we often get requests to authorize multiple domains for the same X3 website. It is not a technical- or license issue for us to authorize multiple domains, but let me explain why you should avoid this at all cost, and how to instead use redirects.

SEO
When you have domainA.com and domainB.net that point to the exact same website, you are confusing Google and other search engines. It will see the exact same page content, and at best it will be considered 'duplicate' content. In many cases, your SEO efforts could get penalized for duplicate content. How would Google know what domain link to show in search results? At best, you are diluting your SEO across multiple 'websites'.
https://moz.com/learn/seo/duplicate-content
https://www.seo.com/blog/multiple-domains-seo/

Canonical links (SEO)
Furthermore, Imagevue X3 uses a standard 'canonical' meta tag in the source for each page, which tells search engines and social media platforms what the consolidated URL for the current page is. This meta tag exists simply because it is healthy for search engines (and humans) to know a single consolidated URL for a web page. If you use multiple domains that show the same pages, you will end up with multiple canonicalized url's that are essentially the same page. Good for no bot or human.
https://moz.com/learn/seo/canonicalization

Imagevue X3 caching
Another reason why utilizing multiple url's is bad, is because of how X3 caches pages. If visiting domainA.com, many references to source files, images and meta tags will be directly from domainA.com. When someone then visits the website from domainB.net, X3 will still serve cached page content, with references to source files and meta tags cross-pointing to domainA.com. Although this is normally harmless, it could sometimes break a cross-domain loading process. Furthermore, it means your cached page source references will be in constant flux between two domains depending on which was accessed first after you make any changes. Unproductive.

Does that mean it's BAD to have multiple domains?
No, certainly not. You may want to own multiple domains for copyright- or geographical reasons, or simply because you have former domain names that you want to keep. For example, you may own myname.com, myname.co.uk and mynamesurname.com ... Nothing wrong with that! But instead of having those three domains work as entirely separate websites, you should decide a primary domain, and redirect all requests that do not match the primary domain, to the primary domain.

Redirect to primary domain  
Solution

The solution to having multiple domains without losing visitors or SEO, is to use a redirect. Choose a primary domain, and redirect all non-primary domain requests to the primary domain. This can often be achieved from your hosting control panel, by simply setting a 301 redirect from one domain to another. However, you can also open up and edit the Imagevue .htaccess file to achieve this:
Code
# Redirect if is not primarydomain.com
RewriteCond %{HTTP_HOST} !^(www.)?primarydomain.com [NC]
RewriteRule ^(.*)$ http://primarydomain.com/$1 [L,R=301]
The above basically does the following: If the url request is not to your primary domain, it will redirect to the primary domain, also respecting the url path after the domain. *Keep in mind that you will need to manually update these settings in your .htaccess if you are upgrading Imagevue X3.

Example
As a real-life example, below are a few links to the same page on a few domains we own related to www.photo.gallery. Since it is counter-productive that each domain should show the same page, confusing search engines and humans, all requests to non-primary domains get redirected to the primary domain (www.photo.gallery).
https://forum.photo.gallery/viewtopic.php?f=62&t=9080 (primary domain, does not redirect)
http://galleryvue.com/forum/viewtopic.php?f=62&t=9080 (will redirect)
http://www.galleryvuex.com/forum/viewto ... =62&t=9080 (will redirect)

Conclusion
Let's round up what happens here: All your domains url's will still work nicely, but will redirect appropriately if they are not your primary domain. Visitors can access from multiple url's, but will ultimately be served a consolidated primary url. SEO bots and social media platforms will remain satisfied, as they will see a consolidated website.

* For those of you who are requesting to authorize multiple domains for the same X3 website, I therefore recommend that you instead follow the procedures above. It is very counter-productive to have multiple domains loading the same website without redirecting.
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 14154
Joined: 30 Sep 2006, 03:37

Re: Can I use multiple domains for the same X3 website?

07 Aug 2016, 01:30

Suppressing / Forcing the `www.` at the beginning of URLs
The above post also applies for websites that have www and non-www url's available for their website, for example http://www.domain.com and http://domain.com. In this case though, since the domain is the same, the redirect process would be slightly different. You should decide if you want to use www or not, and redirect appropriately.
html5boilerplate.com wrote:The same content should never be available under two different URLs, especially not with and without `www.` at the beginning. This can cause SEO problems (duplicate content), and therefore, you should choose one of the alternatives and redirect the other one.
# Option 1: rewrite http://www.example.com → example.com
Code
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>
# Option 2: rewrite example.com → http://www.example.com
Code
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} !^www\. [NC]
  RewriteCond %{SERVER_ADDR} !=127.0.0.1
  RewriteCond %{SERVER_ADDR} !=::1
  RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Important!

 When adding custom rules to your X3 .htaccess file, you must remember to keep these rules updated when upgrading X3 to newer versions. Unfortunately, we can't add these rules by default obviously, and we can't merge your settings either, since they are not generally part of the X3 application.
 
User avatar
TristanJo
Experienced
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: Can I use multiple domains for the same X3 website?

20 Oct 2022, 21:29

:thumbsup::thumbsup::thumbsup: