base url remove

Discussion in 'Tutorials' started by dorcash, Aug 13, 2017.

  1. dorcash

    dorcash New Member

    hi
    can I remove <base href="{$list_url}/" /> ?
  2. cajkan
    • Licensed

    cajkan Active Member

    Hello @dorcash it's recommended to keep that line :)

    Basically it shows search engines whats your main URL
  3. Mark
    • Staff

    Mark Administrator Staff Member

    That line helps with relative paths and URL rewrites, perhaps if you can provide details about the issue you are having with it I can provide some better advice.
  4. dorcash

    dorcash New Member

    Hello
    if i put

    <head><basehref="http://www.domain.com"/><metaproperty="og:type"content="....."/><metaproperty="og:title"content="Title"/><metaproperty="og:description"content="description"/></head>
    in the Structured Testing Tool the follow error message is shown:
    Unspecified Type
    if i remove the line <base href="http://www.domain.com" />it is fine.
    Last edited: Aug 19, 2017
  5. cajkan
    • Licensed

    cajkan Active Member

    Hello @dorcash your meta property is invalid, make sure you copy them correctly from facebook heres example

    <meta property="og:title" content="YOUR TITLE"/>
    vs
    <metaproperty="og:title"content="Title"/>
  6. dorcash

    dorcash New Member

  7. cajkan
    • Licensed

    cajkan Active Member

  8. dorcash

    dorcash New Member

    Hello
    I use this tool
    with base href tag, I see "Unspecified Type" error
    plz read the following issue:
    https://productforums.google.com/forum/#!msg/webmasters/tOewAWTfMDM/l8ZYnmk-BQAJ
    This is a common isue about structured data and base href tag.
    -------------
    plz look at the following report:
    https://search.google.com/structured-data/testing-tool#url=https://www.iramit.net/
    now plz add the following code to left box
    <base href="https://www.iramit.net/" />
    Now press validate button again

    Unspecified Type!!
  9. Mark
    • Staff

    Mark Administrator Staff Member

  10. dorcash

    dorcash New Member

    hi @Mark
    I want to add open graph tags.
    Plz add the following line to the left box of your site's report and press validate button:
    <meta property="og:locale" content="en_US" />
    You will see "Unspecified Type"
    This isuue is related to open graph and base href tag.
    Plz check it
  11. Mark
    • Staff

    Mark Administrator Staff Member

  12. dorcash

    dorcash New Member

  13. dorcash

    dorcash New Member

  14. dorcash

    dorcash New Member

    @Mark plz look at the attached pic

    Attached Files:

  15. Mark
    • Staff

    Mark Administrator Staff Member

    If you look at your screenshot, you have added an extra line that is not on my site :) Try putting <meta property="og:locale" content="en_US" /> BEFORE the base tag as it is on my site, I am just not able to reproduce this "issue".
  16. dorcash

    dorcash New Member

    yes
    @Mark
    I remove my line
    now look at new image

    Attached Files:

    • 1.png
      1.png
      File size:
      37.2 KB
      Views:
      4
  17. Mark
    • Staff

    Mark Administrator Staff Member

    Sorry i am still not able to reproduce, can i ask what the problem is? I mean, its showing 0 errors, 0 warnings. What is this line preventing you from doing? Why is this validation so important? is it possible this is a bug with the validator?
  18. dorcash

    dorcash New Member

  19. Mark
    • Staff

    Mark Administrator Staff Member

    base URL has absolutely nothing to do with structured data, its only used for relative paths. I think you need to speak with Google about this... the base URL and your "unspecified type" really have zero relationship. I think this is a bug in their validator and you are thinking your will penalized, but I highly doubt you would be, again it has nothing to do with structured data.

    Anyway, you can remove the base meta tag, but you would need to ensure you are using absolute paths when loading images and other assets in your template files. Personally, I don't think its worth it.
    dorcash likes this.
  20. dorcash

    dorcash New Member

Share This Page