Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Use a canonical tag to force indexing of a different url?

         

mancunian

12:27 pm on Feb 1, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



I have a new site accessible in 2 ways

1. site.com/directory
2. directory.site.com

I can get format 2. indexed quickly but not 1 (for long reasons involving Google console I wont go into now).

I want format 1 to show in SERPs as site.com has auithority and the subdomain directory.site.com does not.

If I put a canonical tag in all the pages referencing urls in format1. and submit in format 2. then will Googlebot be forced to index the site in format 1.

I hope that is clear.

aristotle

3:36 pm on Feb 2, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This looks like the setup for an addon domain.
If so, there are standard methods for specifying the canonical pages.

aristotle

9:14 pm on Feb 2, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Here is some code I found on the web that's supposed to block anything from reaching an addon site's pages by going through the subdomain:
#BLOCK ACCESS THRU SUBDOMAIN
RewriteCond %{HTTP_HOST} ^http(s)://(www.)?primarydomain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/addon subdomain/(.*)$
RewriteRule ^(.*)$ - [L,R=404]

This code should be put into the .htaccess file in the root directory of the primary domain. It seems to work for me, but I don't know if it's 100% foolproof.

As for canonical tags, according to my understanding, you should put self-referencing canonical tags on all the pages. I've done this for all of my home pages, but never got around to doing it on all the pages of all my sites.

Another thing you might do to specify the canonical pages is to submit a sitemap to GSC.

lammert

10:08 pm on Feb 2, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why a 404 return code and not a 301? This .htacess code provides a cold shower to legitimate visitors who happen to take the wrong door. Better to lead them the right way. A 301 redirect is also a strong signal which URL is the canonical version.

aristotle

10:32 pm on Feb 2, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why a 404 return code and not a 301? This .htacess code provides a cold shower to legitimate visitors who happen to take the wrong door. Better to lead them the right way. A 301 redirect is also a strong signal which URL is the canonical version.

Good question.
I'm not sure about this, but it might be an attempt to hide the fact that the new site is an addon and not a stand-alone site. Although if that's the goal, there might be a better way to achieve it.

phranque

10:41 pm on Feb 2, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i would link internally to site.com/directory.
i would also redirect requests for directory.site.com to site.com/directory with a 301 status code.

then i would use the GSC Change of Address Tool [support.google.com] after verifying ownership of both properties.

aristotle

10:50 pm on Feb 2, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well to the outside world, the server shows the addon as a stand-alone site.

lucy24

2:27 am on Feb 3, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



(for long reasons involving Google console I wont go into now)
I can’t help feeling that you’d get much more useful answers if you could bring yourself to go into this a bit further. It would seem to be the heart of the problem.

If I put a canonical tag in all the pages referencing urls in format1. and submit in format 2. then will Googlebot be forced to index the site in format 1.
Setting aside the part about “Googlebot != the Google index”, I don’t think it is ever safe to put “forced” and “Google” in the same sentence.

phranque

4:05 am on Feb 3, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I can’t help feeling that you’d get much more useful answers if you could bring yourself to go into this a bit further

this was my initial feeling as well.
i expect to hear more about this if/when this is addressed:
after verifying ownership of both properties


I don’t think it is ever safe to put “forced” and “Google” in the same sentence.

about the link rel canonical element, google essentially states that this is a hint:
Note that even if you explicitly designate a canonical page, Google might choose a different canonical for various reasons, such as performance or content.

source: https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls#which-is-my-canonical-url,-according-to-google

mancunian

8:58 am on Feb 3, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thank you all very much for your help.

I was trying to keep my post brief but I will expand on it as requested.

I do not own site.com and it only offers static hosting with no access to .htaccess however it has high domain authority.

This means I cannot verify via it Google console which stops me using the tools in there to help get it indexed quickly.

I think the easiest ideas suggested was to make sure the internal linking is to site.com/directory rather than to directory.site. Also the us of canonical tags.

This would defintely lead Googlebot down the right path I believe.

lucy24

5:38 pm on Feb 3, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I do not own site.com and it only offers static hosting with no access to .htaccess however it has high domain authority.
Oh, good grief. Find your own domain name and move to a new host. Better now than later. You can go a long way on shared hosting, but that’s assuming some rock-bottom basics like being able to use .htaccess (or non-Apache equivalent) so you have full control over your own site.

I don’t think “domain authority” is really meaningful in this context.

My first site was at a now-defunct free host that used the example.hostsite.com convention, but that was a very long time ago. (Well, second site. First was in the form members.aol.com/etcetera, still longer ago.)

aristotle

8:10 pm on Feb 3, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I agree with Lucy that the "authorty" of the primary site most likely won't help you at all. Google is wise to this ploy.

phranque

10:14 pm on Feb 3, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I do not own site.com and it only offers static hosting with no access to .htaccess however it has high domain authority.

you have demonstrated the detrimental effect of not controlling your own domain.
what demonstrated advantage has that domain's "high authority" given you in return?

mancunian

12:02 am on Feb 4, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



Yes i understand but trust me the site.com doamin has huge authority which is worth the other downsides.

phranque

4:20 am on Feb 4, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the site.com doamin has huge authority which is worth the other downsides

how many nofollow links do you have from that "huge authority" site.com to your site.com/domain urls?

mancunian

9:23 am on Feb 4, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



A lery large number. We have experimented withe the domain before and the results have been excellent.