please help, hair being torn out

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
Marine Divers
 
 
Posts: 58
Joined: Fri Jan 03, 2014 7:52 am

please help, hair being torn out

Post by Marine Divers »

i dont have a responsive site, i have 2 sites that skip through to a mobile version and after years of no issue it's not working

i have made a few changes this morning but nothing that i thought would have affected the code to not function:

here is the code in my pages web site is divingincyprus.net

<script>
if (document.location.search.indexOf("skipmobile") >= 0) {
document.cookie = "skipmobile=1";
}
else if ((document.location.hostname.match(/\.mobi$/) || screen.width < 699)
&& document.cookie.indexOf("skipmobile") == -1)
{
document.location = "mobile/";
}

i dont know anything about code, so basic terms and instruction if you can help

desperate
jonny
Last edited by Marine Divers on Mon Mar 06, 2023 11:16 am, edited 1 time in total.
Marine Divers
 
 
Posts: 58
Joined: Fri Jan 03, 2014 7:52 am

Re: please help, hair being torn out

Post by Marine Divers »

all i did this morning was go in the the canonical in seo and put in divingincyprus.net in every page and asked goole to recrawl my pages.
User avatar
Pablo
 
Posts: 21708
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: please help, hair being torn out

Post by Pablo »

We cannot help you with programming related questions.
But my browser throws a lot of errors when I visit your website, so there is probably a conflict somewhere.

So, I suggest to remove all other custom code from the page to find out where it stops working.
User avatar
BaconFries
 
 
Posts: 5364
Joined: Thu Aug 16, 2007 7:32 pm

Re: please help, hair being torn out

Post by BaconFries »

Not at my PC but I think your issue lies with how you have added canonical to your page(s). From reading you have used the same url on each page. Basically what you are telling the search engine is that this page is the home or index (principle) page when it is not. The use of canonical urls is basically to define content or similar content on your site and to tell the search engines which pages they should pull first as the most relevant to the user search.

Now please note I am so SEO expert on this and would recommend you read up on this yourself. Regarding the code this may cause issues with canonical as what it is telling the browser to do is redirect to the mobile version when a user is using a mobile device which may cause confusing to what is actually the main or principle page to search for first (non mobile). As mentioned I am no expert only giving my 2 cents.
See the following on canonical use.
https://yoast.com/rel-canonical/
https://moz.com/learn/seo/canonicalization
Marine Divers
 
 
Posts: 58
Joined: Fri Jan 03, 2014 7:52 am

Re: please help, hair being torn out

Post by Marine Divers »

i only had the skip through to mobile on the index page of my desktop site so im hoping its just that page, when you mean custom code is it all the code that i put into the page html editor? or should i also disable things like the google maps and trip advisor stuff i have on the home page?

jonny
Marine Divers
 
 
Posts: 58
Joined: Fri Jan 03, 2014 7:52 am

Re: please help, hair being torn out

Post by Marine Divers »

yes i see what you mean, i think ive sent the search engine to go around in circles and not skip to my mobile page. thus it seems like it not working, i have now removed all of those from the seo tab on canonical.

didnt really know what i was doing , so now i have to get google to crawl and index my main page site for it to tell it not to go around in circles, and hope for the best
Marine Divers
 
 
Posts: 58
Joined: Fri Jan 03, 2014 7:52 am

Re: please help, hair being torn out

Post by Marine Divers »

tried that,

i dont know now how to get google to read my home page with the canoical taken out so it make the link work. on it's servers thats probably what it still being told to do.
User avatar
crispy68
 
 
Posts: 2749
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: please help, hair being torn out

Post by crispy68 »

Unfortunately, it takes time for the bots to scan your site again and make the changes. You can try to upload an updated sitemap to Google/Bing that may help it along faster.
Marine Divers
 
 
Posts: 58
Joined: Fri Jan 03, 2014 7:52 am

Re: please help, hair being torn out

Post by Marine Divers »

thanks crispy
i did a new site map, i also tested desktop home page for mobile usability and goggle showed me my desktop site. so something is going on

i also did a back up a couple of days ago of my site with out the changes of the last couple of days. when i uploaded that it was still the same.

so my assumption is that google has picked up the canonical tag and not letting it do what it normally did. i'll just have to see when it catches up to show the correct info to the web.

otherwise it's a big drawing board.
rcandrews001
 
 
Posts: 6
Joined: Mon Aug 15, 2011 2:16 am
Location: Birmingham, AL
Contact:

Re: please help, hair being torn out

Post by rcandrews001 »

"i also did a back up a couple of days ago of my site with out the changes of the last couple of days. when i uploaded that it was still the same."

You might have done this, just failed to mention in your comments. After uploading changes you'll want to clear your browser history of cached files before opening the sight. It's possible you didn't see any difference after uploading the backup because you were seeing the cached files.
Post Reply