Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michelle d'Artibale 2 posts 72 karma points
    Jan 24, 2020 @ 13:33
    Michelle d'Artibale
    0

    Content blocks are having there own URLs - resulting in showing up in Google

    Hi.

    Has anybody experienced that part-elements/content blocks on a landing page has it's own URL and is showing up in Google? How do I avoid that?

    For example:

    https://www.sahva.dk/private/fodtoej-og-tilbehoer/ortopaedisk-fodtoej/information-om-diabetes-fodtoej/tekst/

    The last part '/tekst/' is a content block and the link should have been

    https://www.sahva.dk/private/fodtoej-og-tilbehoer/ortopaedisk-fodtoej/information-om-diabetes-fodtoej/

    Is this a bug og is it common practice? Our web partners recommend that I make redirects, but it doesn't seem like the right solution, if I have to that for every single page.

    Se image for illustration. I marked the content blocks with yellow.

    Thank you in advance. /enter image description hereMichelle

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Jan 26, 2020 @ 20:23
    Marc Goodson
    3

    Hi Michelle

    I'm imagining the 'tekst' content block is created beneath the 'information-om-diabetes-fodtoej' page - and it must have a 'template' associated with its content type for it to display the content that 'should' be just part of the parent page.

    Essentially if you have a content block like this with a template then it is considered by Umbraco to be a page 'in it's own right' and will have a Url that can be routed directly to it.

    Normally a content block won't have a template associated with it, and a direct request to it's url returns a 404 page.

    But sometimes people provide a template to allow you to 'preview' in the backoffice the component, in these circumstances it might be worth including a meta tag in the template that tells search engines not to Index the particular url.

    https://developers.google.com/search/reference/robotsmetatag

    <meta name="robots" content="noindex" />
    

    But the big question is - how is google or a search engine even finding that Url?

    Often people will build an Xml Sitemap to help search engines find and index content on their site - I can't check yours at the moment as it appears to be returning an error page:

    https://www.sahva.dk/sitemap/

    but quite often people will loop through the Umbraco site content to produce the Xml Sitemap and not exclude Content Blocks! - which is sometimes how Google can discover the direct Url to the content block...

    https://our.umbraco.com/Documentation/Tutorials/Creating-an-XML-Site-Map/index-v7

    So to resolve this:

    Check if the sitemap is including these Urls or try to work out how search engines are finding them.

    If the template is only provided for the content block to facilitate preview then, check for preview mode in the template, and if not in preview mode, 301 redirect to the parent Url - which will be the landing page.

    eg

    @if(!UmbracoContext.InPreviewMode){
           Response.RedirectPermanent(Model.Content.Parent.Url);
    }
    

    regards

    Marc

  • Michelle d'Artibale 2 posts 72 karma points
    Jan 30, 2020 @ 09:07
    Michelle d'Artibale
    0

    Hi Marc, Thank you so much for your detailed repley. I'll present your suggestions for our web partners. I'll write back with when I know which solution we've ended up with.

    I'm very grateful

    /Michelle

Please Sign in or register to post replies

Write your reply to:

Draft