Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2008
    Posts
    107
    Plugin Contributions
    0

    help question I think (!) that my hreflang just disappeared from my site. How to fix it?

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here.
    And, remove this comment before actually posting!]

    ZC version 1.5.5E
    PHP version 5.6, but tested also with 7.4

    My site, /petrutech.com/ uses 6 languages.
    It looks to me that it works in all languages, but haven't tested it with a VPN.
    At the beginning of May, I had a DDoS attack (or any attack that I don't know). For 3 days, I had exactly 2000 visitors from all the countries in the world, within a few hours. Up to then I had up to 80 - 100 visitors per day (including some bots).
    I got an ACL - not very accurate, and blocked 3 continents and many countries in .htaccess file. I blocked them for about 2.5 weeks.
    Then, I deleted the blocked list. The "attack" stopped, but from then, I there are maximum 25 visitors per day.
    They come from different countries, mostly from U.S.
    I checked the home page, and found that .hreflang. doesn't appear there (or any other page).
    I am attaching a print screen of international targeting in search console:
    Click image for larger version. 

Name:	maximal hreflang.jpg 
Views:	55 
Size:	18.5 KB 
ID:	19605

    My questions are:
    1. Can the hreflang just disappear?
    2. Could this attack cause it disappearing?
    3. How the site works in 6 languages without hreflang?
    4. Do I need in this site hreflang?
    5. If I need it, can someone guide me how to fix it?

    The dates of dropping in visitors visits is about the date of the attack. From the 1st - 2nd page in Google, I am now on page 8, for about one month.

    The only changes were denying IPs, then deleting the entire list from .htaccess.

    Please, help me, if you may have any idea!
    Thanks in advance!
    I'll never know how much I don't know...

  2. #2
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Quote Originally Posted by Ridgh View Post
    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here.
    And, remove this comment before actually posting!]

    ZC version 1.5.5E
    PHP version 5.6, but tested also with 7.4
    In your_site/includes/templates/template_default (and-or your_template)/common/html_header.php
    version 1.5.5f has on line 53 // BOF hreflang for multilingual sites
    If you have a backup of your files compare html_header.php with your backed up version (you can check the other files while you're at it, just to be safe)
    Use a program like Winmerge: Download today's files and run them against the backup.

    Hreflang is an HTML attribute used to specify the language and geographical targeting of a webpage. If you have multiple versions of the same page in different languages, you can use the hreflang tag to tell search engines like Google about these variations. This helps them to serve the correct version to their users.
    Your site will work but it could have an effect on Google ranking. But that's something you already know. The development team placed it there for a reason.

  3. #3
    Join Date
    Feb 2008
    Posts
    107
    Plugin Contributions
    0

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Quote Originally Posted by Philibel View Post
    In your_site/includes/templates/template_default (and-or your_template)/common/html_header.php
    version 1.5.5f has on line 53 // BOF hreflang for multilingual sites
    If you have a backup of your files compare html_header.php with your backed up version (you can check the other files while you're at it, just to be safe)
    Use a program like Winmerge: Download today's files and run them against the backup.



    Your site will work but it could have an effect on Google ranking. But that's something you already know. The development team placed it there for a reason.
    Thank you for replying, Philibel!
    I am sorry I forgot to delete the lines above the text...
    As per the site:
    I couldn't find in the /template_default (and-or your_template)/common/html_header.php this string or any string related to hreflang. However I could find it in /template_default/common/html_header.php I use ########## template. Indeed, the html_header.php appears there, but it doesn't contain the string.
    The string that appears in "template_default" is the following (at line 53):
    PHP Code:
    // BOF hreflang for multilingual sites
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
      
    $lng = new language;
    }
    reset($lng->catalog_languages);
    if (
    sizeof($lng->catalog_languages) > 1) {
      while (list(
    $key$value) = each($lng->catalog_languages)) {
        echo 
    '<link rel="alternate" href="' . ($this_is_home_page zen_href_link(FILENAME_DEFAULT'language=' $key$request_type) : $canonicalLink . (strpos($canonicalLink'?') ? '&amp;' '?') . 'language=' $key) . '" hreflang="' $key '" />' "\n";
      }
    }
    // EOF hreflang for multilingual sites 
    I compared it with a similar backup file from February. It looks that they are identical.

    I have an additional site using prestashop. There, the hreflang appeares this way:

    </script><link rel="canonical" href="https://www.spytechman.com/en/">
    <link rel="alternate" href="https://www.spytechman.com/en/" hreflang="en">
    <link rel="alternate" href="https://www.spytechman.com/en/" hreflang="x-default">
    <link rel="alternate" href="https://www.spytechman.com/fr/" hreflang="fr">
    <link rel="alternate" href="https://www.spytechman.com/es/" hreflang="es">
    <link rel="alternate" href="https://www.spytechman.com/de/" hreflang="de">
    <link rel="alternate" href="https://www.spytechman.com/it/" hreflang="it">

    <script type="text/javascript" src="https://www.spytechman.com/themes/prestashop/js/bootstrap.min.js"></script>

    But in /petrutech.com/ I couldn't find any hreflang.

    /petrutech.com/ is working in all six languages, but without hreflang!

    I asked my kid that is a software engineer to install this site, about 2-3 years ago, and I had no problems so far. He doesn't work in this niche, and it was the first time he hears about hreflang...

    It may be that I am going in the "wrong direction", and something else is truncated or messed... He claims that DDoS attack (if indeed it was a DDoS) cannot influence the huge drop in ranking and maybe it should be something else.

    Anyway, I would like to make the change in the URL so instead /https://petrutech.com/xxxxxx (in French for example)/ (Now), will change to /https"/petrutech.com/fr/xxxx/. I believe that the hreflang may do this change.

    But I still wonder about the most important issue: the drop!

    Any ideas / help?

    Thank you very much,
    Regards,
    Ridgh
    I'll never know how much I don't know...

  4. #4
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Quote Originally Posted by Ridgh View Post
    I couldn't find in the /template_default (and-or your_template)/common/html_header.php this string or any string related to hreflang.
    However I could find it in /template_default/common/html_header.php I use ########## template. Indeed, the html_header.php appears there, but it doesn't contain the string.
    What I meant, was in files:
    • /template_default/common/html_header.php
    • and/or
    • /##########_temp/common/html_header.php (for some reason the name is automatic wiped out)


    Quote Originally Posted by Ridgh View Post
    The string that appears in "template_default" is the following (at line 53):
    PHP Code:
    // BOF hreflang for multilingual sites
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
      
    $lng = new language;
    }
    reset($lng->catalog_languages);
    if (
    sizeof($lng->catalog_languages) > 1) {
      while (list(
    $key$value) = each($lng->catalog_languages)) {
        echo 
    '<link rel="alternate" href="' . ($this_is_home_page zen_href_link(FILENAME_DEFAULT'language=' $key$request_type) : $canonicalLink . (strpos($canonicalLink'?') ? '&' '?') . 'language=' $key) . '" hreflang="' $key '" />' "\n";
      }
    }
    // EOF hreflang for multilingual sites 
    So, in /template_default/common/html_header.php the original is:
    PHP Code:
    // BOF hreflang for multilingual sites
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
      
    $lng = new language;
    }

    if (
    sizeof($lng->catalog_languages) > 1) {
        foreach(
    $lng->catalog_languages as $key=>$value) {
        echo 
    '<link rel="alternate" href="' . ($this_is_home_page zen_href_link(FILENAME_DEFAULT'language=' $key$request_typefalse) : $canonicalLink . (strpos($canonicalLink'?') ? '&amp;' '?') . 'language=' $key) . '" hreflang="' $key '" />' "\n";
      }
    }
    // EOF hreflang for multilingual sites 
    Why yours isn't,

    But that's not really important now because you use the ########## template.
    What is important IF it has a simular code (and I think it doesn't) in /##########_temp/common/html_header.php, because that's the file your site uses!

    Can you get that file zip-ed and send as an attachment in your next post?
    I just looked at my own site and the hreflang is within the first 20 lines of the page source.

    Quote Originally Posted by Ridgh View Post
    I have an additional site using prestashop.
    The architecture of ZenCart will write it as URL&language=XX which does appear in your site URL
    Just nothing on page-source.

    Quote Originally Posted by Ridgh View Post
    But I still wonder about the most important issue: the drop!
    My guess is that blocking made unwanted visitors turn their aim to other sites. Did you see a drop in real buyers?

    Do you know that "Email Us At:" has a generic mailto reference?

  5. #5
    Join Date
    Feb 2008
    Posts
    107
    Plugin Contributions
    0

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Quote Originally Posted by Philibel View Post
    What I meant, was in files:
    • /template_default/common/html_header.php
    • and/or
    • /##########_temp/common/html_header.php (for some reason the name is automatic wiped out)




    So, in /template_default/common/html_header.php the original is:
    PHP Code:
    // BOF hreflang for multilingual sites
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
      
    $lng = new language;
    }

    if (
    sizeof($lng->catalog_languages) > 1) {
        foreach(
    $lng->catalog_languages as $key=>$value) {
        echo 
    '<link rel="alternate" href="' . ($this_is_home_page zen_href_link(FILENAME_DEFAULT'language=' $key$request_typefalse) : $canonicalLink . (strpos($canonicalLink'?') ? '&amp;' '?') . 'language=' $key) . '" hreflang="' $key '" />' "\n";
      }
    }
    // EOF hreflang for multilingual sites 
    Why yours isn't,

    But that's not really important now because you use the ########## template.
    What is important IF it has a simular code (and I think it doesn't) in /##########_temp/common/html_header.php, because that's the file your site uses!

    Can you get that file zip-ed and send as an attachment in your next post?
    I just looked at my own site and the hreflang is within the first 20 lines of the page source.



    The architecture of ZenCart will write it as URL&language=XX which does appear in your site URL
    Just nothing on page-source.



    My guess is that blocking made unwanted visitors turn their aim to other sites. Did you see a drop in real buyers?

    Do you know that "Email Us At:" has a generic mailto reference?
    ##################################################

    Hello,
    I am attaching the relevant files.
    I assume that maybe he did a mess - but not he and nor I can remember if he did a clean install or used an old template.
    My guess is that blocking made unwanted visitors turn their aim to other sites. Did you see a drop in real buyers?
    Yes, a huge drop within 70-80%. I "filtered" them just by arrival from search engines and "not referring link" using statcounter. In any case, the "total" is a drop of more than 70%! I barely get 1-2 buyers per month, and not too long ago I had 3-5 orders per week!
    Do you know that "Email Us At:" has a generic mailto reference?
    Yes, I know, however I have no idea how and where to edit it. The same with the address in the footer (lol, I wish to be there...).
    In general, I have a problem with the "Inspector": I can find the element, but I cannot find (I don't know how to find...) the file name.
    For example: changing the address or Email Us At... I cannot find where to edit this footer...
    At my age (I just "changed the prefix" to 70 3 days ago) I do my best, as it is not so easy to learn a new thing, but without learning, I feel useless.
    Attached Files Attached Files
    I'll never know how much I don't know...

  6. #6
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Okay, this is what I think your problem is in relation to your hreflang.

    Nobody took or could take the hreflang-code from your html_header.php in the ########## template because it was never there.

    The file is build on the Zen Cart version 1.5.0 and that make sense to me if I take a look at your site.
    © Copyright 2012 by petrutech.com
    I presume you bought the template in 2012 just before Zen Cart version 1.5.1 came out. The code is there starting 1.5.5 that's why your default html_header.php does have it. The template uses css for language specific stylesheets.

    I think it's best you contact the vendor for an update on your template. That e-mail and address are from the showcase of the template (I've just seen them there).

    Yes, I know, however I have no idea how and where to edit it. The same with the address in the footer (lol, I wish to be there...).
    In general, I have a problem with the "Inspector": I can find the element, but I cannot find (I don't know how to find...) the file name.
    For example: changing the address or Email Us At... I cannot find where to edit this footer...
    At my age (I just "changed the prefix" to 70 3 days ago) I do my best, as it is not so easy to learn a new thing, but without learning, I feel useless.
    עד מאה ועשרים שנה

    I'd expect it to be in tpl_footer.php
    There might be:
    HTML Code:
    <a href="mailto:[email protected]">' . STORE_OWNER_EMAIL_ADDRESS . '</a>
    while it should say:
    HTML Code:
    <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS .'">' . STORE_OWNER_EMAIL_ADDRESS . '</a>
    I advise:
    HTML Code:
    <a href="' . zen_href_link(FILENAME_CONTACT_US) . '" name="linkContactUs">Contact us</a>
    It redirect people to the contact page so spammers don't get your e-mail without much effort. Best of all just remove the whole list under "GET IN TOUCH" with that link. The contact page has your postal address, phone and e-mail option.

    When you say "Inspector", do you mean: Admin > Tools > Developers Tool Kit?
    When you enter a search in "Look-up in all files" try it with key words like mailto as the syntax is often code and text in the files. The whole line doesn't exist on the server and is only made when send to the browser. (Much like an IKEA closet only exist as such after it reaches the customer)

  7. #7
    Join Date
    Feb 2008
    Posts
    107
    Plugin Contributions
    0

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Hello,

    עד מאה ועשרים שנה
    Thank you very much!!!

    Unfortunately, I cannot update the version by myself, as I don't have the knowledge to do it. Updating by someone from Fiverr or similar, costs too much and as a pensioner without the sites income, I cannot permit myself to do it.
    It worked well up to this attack, I mean that there were many visitors per day, some of them bought. Now, from 3 sites I have (ZC, Prestashop and WP - the last one I did it by myself!) there are almost no visitors.

    When you say "Inspector", do you mean: Admin > Tools > Developers Tool Kit?
    No, I mean the "Inspector" that appears in my browser when I highlight an element, for example:
    Click image for larger version. 

Name:	mailto.jpg 
Views:	20 
Size:	29.2 KB 
ID:	19615
    OK, I can see where I have to change, but cannot find the file that has to be changed, or to which file it belongs (it appears as a CSS file).

    You wrote me, for this example: tpl_footer.php. However, you have the knowledge where is this element. I couldn't find the name of this file by "Inspector"...
    Is there any way? I watched several Youtube clips about it, but I couldn't find even a clue how to find "tpl_footer.php" in Inspector.

    Out of topic: I lived for two years in your country as a kid (12 years old), in Bruxelles. From then, we visit it frequently, as I am a nostalgic man... I even remember the street name, but not the number... My heart remained there...

    Thank you again for your help!!!! I really appreciate it!
    All the best
    Ridgh
    I'll never know how much I don't know...

  8. #8
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: I think (!) that my hreflang just disappeared from my site. How to fix it?

    Ah, different browser, different language. "select elements" appears when I put the cursor over it.

    Anyhow, it's only good to see what you receive in your browser. Your browser can tell you the name of a stylesheet file. But as it will never find out what php file make a certain html code, it can not tell you.

    That what you need to use "Developers Tool Kit" for. You can use that to find the location of the file. With FTP software you can grab the file, back it up and copy it. Then you make the changes to the copy. In case that turn out to be a mistake, you can upload the backed up file to bring things back the way they were.

    It should be:
    /includes/templates/##########_temp/common/tpl_footer.php

    Zip and attach it, I'll take a look.

 

 

Similar Threads

  1. is it possible to fix my site to be up to date from old templates that i botched up
    By mydesignerstudio in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 Dec 2012, 02:44 PM
  2. How is possible that alla central part of the site is disappeared?
    By matteoraggi in forum General Questions
    Replies: 1
    Last Post: 31 Jan 2012, 02:35 PM
  3. How do I fix that gap?
    By wetjet in forum General Questions
    Replies: 3
    Last Post: 14 Apr 2007, 05:05 PM
  4. Replies: 3
    Last Post: 12 Apr 2007, 11:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR