Welcome to WebmasterWorld Guest from 34.237.76.91

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Upgrade to HTTPS - Absolute vs. Relative Links?

     
8:28 pm on Jun 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1



NOTE: Quoted post from thread where this discussion originated: [webmasterworld.com...]


This has been posted a few times, but maybe should be posted in this thread as well:

- Generic Steps to Switch from HTTP to HTTPS -

Read all info at your host concerning certificates & switching to HTTPS and when applicable, follow those instructions.

Install security certificate.

Have you host enable HTTPS (if needed.) This will enable access from both HTTP & HTTPS.

Go through site, page by page & make sure all file paths are relative (no protocol.) Test by accessing site using HTTPS and look for any browser alerts.

Install 301 code in .htaccess file
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Note: your server may require a different code

Go through site again, page by page, and test. Any remote absolute links will need to be HTTPS including those found in scripts & pluggins. If you publish Adsence or other advertising, links in these scripts need to be HTTPS also (or just remove the protocol altogether.)

Update sitemap.xml (if applicable) and submit to appropriate agencies (Google, Bing, Yandex, etc)

In Google Search Council create a new site using HTTPS (do not use the Change of Address form.) It will take a few days to start populating information. This is normal & traffic to old site (HTTP) will drop off accordingly.

Bing Webmaster Tools, Yandex & others should update automatically once they crawl your new pages. Updating/re-submitting sitemap.xml should speed up this process.


" Go through site, page by page & make sure all file paths are relative (no protocol.) Test by accessing site using HTTPS and look for any browser alerts."

Why I ask this is because I just changed over to https and my web host changed all my urls to relative from absolute (all my urls were absolute since approx. 2007). I have been working to change them back to absolute. Am I misunderstanding but from your comment above are you saying we should not be using absolute protocol urls (https://) even for image links?




[edited by: not2easy at 8:18 pm (utc) on Jun 13, 2017]
[edit reason] Added quote from original Thread [/edit]

9:02 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15804
votes: 846


my web host changed all my urls to relative from absolute

Well, good for them. There's no earthly reason ever to use absolute links for your own site, except in the rare case where some areas are http-only while others are https-only.

That's assuming when you say "relative links" you mean ones beginning in / or //. If you mean links beginning in ../ then it's time to have a talk with your host.

Which brings us to the real question: What was your host doing, editing the content on your site anyway?
9:24 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


I had them change it back from // to https:// because an SEO person told me that I should have these changed back immediately. This is the way my site was (http://) for years prior to moving to https. My host did this (change my urls but they used relative // instead of https://) as a courtesy for me when they set up SSL certificate on my site. They also changed my urls to non-www instead of www and did a redirect besides the 301 permanent redirect from http to https. Since moving to https, my sales have flat lined. The https sitemap of 1331 urls submitted to Google, 1219 are indexed. SSL Server Test gives my site an A. My site is about the same position in Google search results for its main keyword as it was before. I am at a loss of what is the problem. That is why I am here, searching to find any answers to what could be causing this problem.

One thing I forgot to mention was that when they changed all my urls to relative, my old http sitemap.xml broke and I received notice in Google of 1300+ errors. That is another reason I asked them to put my urls back to absolute, but the relative urls were in place from 5/19 to 5/24...so I am wondering if this caused a problem?

[edited by: DChan at 10:01 pm (utc) on Jun 6, 2017]

[edited by: phranque at 6:34 am (utc) on Jun 7, 2017]
[edit reason] disable accidental linking [/edit]

9:34 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


" Go through site, page by page & make sure all file paths are relative (no protocol.) Test by accessing site using HTTPS and look for any browser alerts."
I think Lucy24 explained it pretty well. Protocol is something the browser negotiates with the web server. In today's internet, it's best to not interfere in that process.

If your host has done this for you as part of the HTTPS upgrade, you're fortunate. They saved you a lot of work.
I have been working to change them back to absolute
I would advise to keep these relative.

I had them change it back from // to https:// because an SEO person told me that I should have these changed back immediately.
@DChan, same advice.

[fix typo]

[edited by: keyplyr at 9:47 pm (utc) on Jun 6, 2017]

9:37 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Keyplyr....so by my web hosting returning the urls back to absolute...could this cause a problem with traffic and such a drop in revenue?
9:49 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


@DChan - should not cause a problem if all the links are correctly done, it is just not necessary to use absolute link paths. Some load balancing server set-ups may treat that as a routed request sending the request through more steps than if the link was relative to your account.
9:50 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Thank you. Yes, my hosting has been very good to me, but I feel there is something going on. It is not normal for sales to flat line and especially for so long. Do you think putting the urls back to relative may clear up any problems that could be caused by the change over? I have had a few customers contact me that they are unable to use my shopping cart properly (it is just paypal buttons, actual transaction is not performed on my site) and that the page disappears and other weird things. Would having absolute make any different in this? I had absolute urls throughout my site and within my paypal cart buttons since 2007.

Sorry, didn't mean to hijack this thread. I am just very concerned and looking for anything that might help find the problem I now have since moving to https.
10:00 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Do you think putting the urls back to relative may clear up any problems that could be caused by the change over?
No. As said earlier, the protocol (if correctly done) has nothing to do with SE ranking, so shouldn't play much of a part in sales performance. I say "shouldn't play much of a part" because by being HTTPS, some very old browsers will not display your content.

The relative or absolute paths should be irrelevant to sales as well.
10:08 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Ok, thank you. My web host has told me they would put it back to http if I think it (https) is causing such a problem with sales, but Google has now de-indexed my http urls from over 1300+ down to 181 as of today, so wouldn't that just further the problem?
10:21 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Bad idea to switch back to HTTP because of the indexing. All sites must be HTTPS anyway, so just deal with any issues. Good luck.
10:44 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Thank you so much, I really appreciate your replies.
10:56 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Just one more question, all my urls were put back by my host to https:// protocol, except they didn't return the image links to absolute but left them relative. Should I leave it that way or should I make it consistent across my site and make the image urls also absolute to match? (all were absolute previous to changing to https, now only image urls are relative).
11:00 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Up to you DChan, but as noted earlier... you should be using relative links.

BTW - if no one has welcomed you, let me do so now :)

welcome to WebmasterWorld [webmasterworld.com]
11:13 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Thank you so much for the welcome.

Re using relative links. Well, I hate to ask my host to put the urls back to relative after they were so kind in changing them to relative in the first place and then changing them back again to absolute when I requested it. It would have took me forever to do over 1300 pages of urls! If having the urls as absolute never hurt my sales all these years (I had a pretty successful business. "had" is the keyword here =( ) and absolute urls won't hurt on an https site, then I won't ask them to do this again. If you or anyone thinks there could be any kind of problems with having absolute urls on https site then I would ask them. I am sure they would do this for me if I asked, that is how great they are, but I would rather not ask again. I would just like to have everything consistent across the site.
11:19 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


hate to ask my host to put the urls back...
Probably not a big deal for them. It's just a one-click tool. I say "let them earn their money"
11:26 pm on June 6, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


LOL, you are right as they emailed me within 10 minutes, after asking them to put the urls back to absolute, that they were finished, BUT, I feel stupid asking. =)

I guess I just can't get my brain around why it is better. If like you said previously that "the protocol (if correctly done) has nothing to do with SE ranking, so shouldn't play much of a part in sales performance" and "The relative or absolute paths should be irrelevant to sales as well." So what benefit is it to me to have the urls put back to relative?
11:32 pm on June 6, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


I guess I just can't get my brain around why it is better.
Well pardon me for stating the obvious, but had you all relative links to begin with, you wouldn't have gone through all this :)
12:07 am on June 7, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Probably so, but I had no idea until now. Since my site had absolute links, my sitemap.xml had absolute links (I found that Google doesn't accept non-protocol url sitemaps). So when my web host changed my site to relative links with their "one-click tool" it also changed my http sitemap to relative links (I did not have my https sitemap uploaded to the server yet). I then had over 1300 errors in Google Search Console for my sitemap in the http property with the error stating that the sitemap was now not accepted protocol. I had to again upload my old http sitemap to the http property of Google to fix the errors. I was told that leaving the sitemap in place for a while after the change helps Google to follow the 301 redirects. I don't know. All I know is I am beginning to wish I had not changed over to HTTPS.
12:16 am on June 7, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


As you found out, sitemap.xml needs to be complete (absolute) links. It needs to be all HTTPS. That should be the *only* sitemap.xml that exists now.

As shown earlier in the - Generic Steps to Switch from HTTP to HTTPS -... in GSC you leave your old property of HTTP (and all that info) and create a new HTTPS property.

So the old sitemap.xml no longer exists but it is still in listed in the old HTTP GSC property.

The new HTTPS GSC property should have the new HTTPS sitemap.xml listed.

All I know is I am beginning to wish I had not changed over to HTTPS.
That's only because you didn't have the correct information. Your host should have supplied that, possibly via a knowledge base.
12:37 am on June 7, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


So I should remove the old http sitemap from my server? At this time I have the original http urls sitemap.xml and the new https urls sitemap2.xml on my server. I have four properties for my website in GSC, http (www and non-www) property, and https (www and non www) along with the http and https sitemaps in their properties. I have the https as my preferred domain. The reason I didn't remove the original sitemap was because I was worried about Bing being able to access it since I couldn't find anything on setting https on Bing. I did submit my https sitemap to Bing but I can't find anything else about what to do there. Could this be the problem, having two sitemaps on the server? I have a 301 permanent redirect from http to https, so would this even matter? Sorry about asking so many questions.
12:49 am on June 7, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


So I should remove the old http sitemap from my server?
Yes. As I said above, the HTTPS version of sitemap.xml should be the only one that exists online (on your server.)
1:49 am on June 7, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1



Ok thank you. My https sitemap was last processed on 6/5 My http sitemap Google processed on 6/1 (I changed to https on 5/19), so if they try to process the http sitemap again it will give an error if I remove it from my server?





[edited by: not2easy at 2:01 am (utc) on Jun 7, 2017]
[edit reason] cleanup splicing debris [/edit]

1:53 am on June 7, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


if they try to process the http sitemap again it will give an error if I remove it from my server?
Google understands what's going on when a site is upgraded to HTTPS. If you have installed the 301 redirect properly, Google will now be served the new HTTPS sitemap.xml.

Just follow the steps mentioned earlier and don't overthink this.
2:22 am on June 7, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


I definitely do over think things, along with reading stuff that confuses the issue...like the comments below from Google forum and John Mueller himself:

"Yes, indeed. Once you verify the HTTPS version in the Search Console, create and submit two sitemaps: one with the old URLs, and one with the new ones. This will make the discovery process quicker" "Submit both old and new sitemaps on the HTTPS profile in your Google Search Console." [productforums.google.com...]

"# What's the next step after testing? Follow our site-move documentation ( [support.google.com...] ). Use 301 redirects from HTTP to HTTPS, confirm the new version by adding a rel=canonical on the HTTPS page, pointing to itself, and submit sitemaps including both HTTP & HTTPS URLs with new change-dates (in the long run, just keep the HTTPS sitemap). " [plus.google.com...]
2:26 am on June 7, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4456
votes: 331


I have had a few customers contact me that they are unable to use my shopping cart properly (it is just paypal buttons, actual transaction is not performed on my site) and that the page disappears and other weird things.


I haven't seen it mentioned here, but it is important that if you have more than one directory and there is more than one htaccess file that you need to add rewrites to directories or folders that contain files. Those 301's are not usually inherited. You need to test all folders by trying to access the old URLs listed in your sitemap and making certain that the rewrites are specified as 301 because 302 is Apache's default.

If you never bothered to rewrite to www or non www, you should incorporate that at the same time as https so that there is only one URL per page.

External links to PayPal should be https absolute links, and your sitemap needs to use full absolute URLs.
2:30 am on June 7, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


For subdirectories to inherit the rewrite rules, just add this to each subdirectory htaccess:
RewriteEngine on
RewriteOptions inherit
2:39 am on June 7, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4456
votes: 331


IF there is an existing htaccess file in any of those sub-directories, they do not inherit. All hosts are not configured the same way. I found that out the hard way. Test to be certain. It takes under a minute to try an URL to see whether it can be accessed more than one way.
2:43 am on June 7, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


@DChan - I can see the confusion when someone at a Google discussion says...
submit sitemaps including both HTTP & HTTPS URLs with new change-dates (in the long run, just keep the HTTPS sitemap)
IMO this is not only bad advice, but serves no purpose. The 301 will take everyone, including Googlebot, to the HTTPS sitemap.xml. Having 2 conflicting records is not a good thing. Just let Googlebot crawl the new links and be done with it.

too many cooks...
2:54 am on June 7, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Thank you. My web host set up the 301 permanent redirect from http to https and also for the www to non www. At first, when they changed all the urls from http to relative urls, my Paypal button code was also changed to relative. When they changed my urls back to absolute, after I requested this, the Paypal buttons were also changed back but to non www (they didn't ask me if I wanted the urls non www, they just did it). So when they changed things back to absolute urls the urls are still non www. They also left the cart button image urls relative.

As I was checking things to see if I could find any problems, I searched my indexing in search with "site:" The result is 1,870 urls. According to my sitemap I have 1331 urls which 1219 have been indexed GSC. But when I use "site:https..." it shows I have 1,870 urls and it is showing my www urls and only shows about 14 of those. Shouldn't it be showing my https urls? If I just enter "site:" without the the https protocol it displays 1,870 links, shows 22 pages of urls but only 18 have urls listed, clicking page 19 to 22 shows an error: "your search ------ did not match any documents. This is driving me crazy...there is something not right somewhere.
2:59 am on June 7, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:June 6, 2017
posts: 51
votes: 1


Ok, not2easy, when I check the urls, those that I test do redirect to https.

Yes, keyplyr, it is very confusing and I am wondering if that is why I am getting such weird stuff when searching my site in search, because of the two sitemaps being on the server. The old http is sitemap.xml and the new https is sitemap2.xml.

[edited by: DChan at 3:16 am (utc) on Jun 7, 2017]

This 38 message thread spans 2 pages: 38
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members