My client could not get subdomains of his website and he bought a completely different domain but the content and design, everything is the same so those two sites are duplicate site for different locations. Can I set hreflangs for two different domains like this
<link rel="alternate" hreflang="en-US" href="https://example.com/"/>
<link rel="alternate" hreflang="es-AR" href="https://ar.differentexample.com/"/>
Personally, in my experience having unique content in each territory works best but that does not mean that duplicate content targeting different locations does not work, lots of brands do it quite successfully. Secondly, there is nothing wrong with your example.
Related
We have multiple basestores with multiple languages and want to implement the hreflang tags to all pages (if easier, it might not include cart and checkout) telling the searchengines that there are multiple versions of the same page in different languages.
We followed the guide on Automatic Context Configuration to provide the multiple basestores.
We also added the SiteContextSelectorComponent to allow the user to change the language.
At the moment all pages face the same structure:
https://company.com/us/en/c/CategoryName -> where us is the country and en the language
Other examples:
https://company.com/us/es/c/CategoryName -> us store with spanish language
https://company.com/us/de/c/CategoryName -> us store with german language
https://company.com/de/de/c/CategoryName -> de german store with german language
The hreflang tags should be generated like
<link rel="alternate" hreflang="en-us" href="https://company.com/us/en/c/CategoryName" />
<link rel="alternate" hreflang="es-us" href="https://company.com/us/es/c/CategoryName" />
<link rel="alternate" hreflang="de-us" href="https://company.com/us/de/c/CategoryName" />
<link rel="alternate" hreflang="de-de" href="https://company.com/de/en/c/CategoryName" />
<link rel="alternate" hreflang="x-default" href="https://company.com/c/CategoryName" />
Working with meta resolvers might not work, due to the fact, that the tags are link and not meta.
So what's the spartcus way to do this?
A (angular) solution might be, injecting the document and adding the tags this way. But is this really the preferred way?
And a further question would be, where's the right place to add these tags (on languageswitch? or routechange?)
Kind regards and thanks for your help,
Andreas
At the moment of writing, Spartacus doesn't have a mechanism for declaring in the <head> of the document the language-oriented alternate URLs.
However, Spartacus already implements the mechanism for resolving the canonical URL. It's based on the concept of multiple PageMetaResolvers and the core PageMetaService. Then the SeoMetaService observes the resolved meta-data for the current page and updates the document with appropriate canonical URL link, title, and other data.
You will need to write a customization for "alternate" links. And here are my recommendations how to do it:
extend the SeoMetaService and perhaps PageMetaLinkService - for phisically placing the links in the head of the document
perhaps extend the PageMetaConfig and PageMetaService for resolving specific values for your alternate links
The concrete strategy of resolving the "alternate" links might vary from customer to customer. Your case seems to be simple, since you don't have any localisation of the URL segments (e.g. /category/xxx in English vs. /categorÃa/xxx in Spanish). Your URLs seem to only vary in the URL prefix - the standard URL site context. Then you can derive your specific "alternate" links from the canonical URL (which Spartacus already have implemented) and replace only the language in the prefix of the URL path, e.g. using a RegExp.
Since you don't need a different strategy of resolving "alternate" links for different pages (e.g. different strategy for PDP and different for PLP), then you might "hardcode" your way of resolving "alternate" links either in your customized PageMetaService or SeoMetaService. In other words, you won't need to bother with customizing each and every existing PageMetaResolver.
I've been reading up on performance benefits of using and to help fetch critical resources but one thing I can't quite figure out is whether these techniques still offer benefit when the resource is located on the same domain as the page that's requesting them.
E.g. I'm optimizing a page at abc.com Should I add a <link rel="preconnect" href="abc.com"> or <link rel="preload" as="script" href="abc.com/main.js"> to my markup? Or will it not have any effect since the current page is on the same domain as the link href values?
preconnect will have no effect (you are already connected to the domain).
preload will have an effect (causing resource to be fetched immediately, without waiting to discover where in the page is it used).
I am working on the SEO optimization of a multistore. For example I have in the same language and same currency website:
www.test.com
subdomain.test.com
Why like that? Because main is for wholesales customers and subdomain for retail customers.
We have too much products so it's impossible to make different text for shared products.
So we had to set the product for both stores. So the duplication is almost 100% (of course the menu and some information around product is a little bit different but the product is the same) For us and also for Google is main www.test.com.
What is the best in this case to get from google the best ratio? I'm wondering if our main website isn't a little bit go down cos of duplication on subdomain.
I was thinking about setting subdomain to noindex,nofollow and let Google index only main website.
Or if this isn't problem for Google I can let like now but I'm not sure.
You can use canonical tag on the subdomain pages. Canonical Tag tells search engines that a specific URL represents the master copy of a page. Using the canonical tag prevents problems caused by identical or "duplicate" content appearing on multiple URLs. Following is the syntax of canonical tag:
<link rel="canonical" href="https://www.test.com"/>
I have a multi-language website. The default language is German. Google seems to be indexing only the English version at example.de/en/. The redirect being used is based on geolocation. For example if someone visits the site from outside of Germany, they will see the /en/ site.
From what I understand Google crawlers will end up redirecting because they are based in the USA and thus will only index the English version of the site both on google.com and google.de. Since my site is targeting primarily Germany, I want to make sure that when someone searches on google.de they will see the German site in the results. What is the best way for me to go about this? I am currently using the hreflang property. For example on the English site we have this code:
<link rel="alternate" hreflang="de-DE" href="https://mysite.de/" />
And on the German site we have this code:
<link rel="alternate" hreflang="en-US" href="https://mysite.de/en/" />
Shouldn't Google recognize this and display relevant search results based on which version of Google is being queried?
You are not using the hreflang links properly. You need to use x-default for the default language and you need to add multiple hreflang links to specify alternate version of your pages, in each page. You could also achieve this by using hreflang in your sitemap. Check here for more details.
Right now, Google is probably confused by what your are trying to achieve, because the information is incomplete. It probably tries to play it safe to avoid duplicate content.
I'm working on a website which currently has two different domains pointing at it:
example1.com
example2.com
I have read that serving identical content to multiple domains can harm rankings.
The website being served is largely the same with the exception of item listings (think of an e-commerce site) and a few other minor tweaks (title, description, keywords, etc). Depending on the domain used it will adapt to serve different items.
Does this resolve the issue of serving duplicated content across multiple domains thus not harming the rankings?
Or would I be better to 301 redirect to a single domain and go from there?
If both your URLs show the same styled product listing then it will definitely affect the search engine result. Give a different look to both your websites in terms of displaying product or changing navigation menu. Put a slightly different image and add different descriptions to display your product.
If you run a website with same content and design on two different domains even with modified title, description and keywords, it is bad SEO practice and your website will be penalized by search engines.
Best option would be making a new website design with original content for the second domain and optimize it. Other wise you can make a 301 redirect for pointing domain 2 to the domain 1, this will not harm you nor help you!
I have also seen multiple domains having same website, content, title and description.. But to my surprise that domain is ranking well.. Crazy search engines!