iGB Affiliate 62 Apr/May | Page 14

TRAFFIC
< a href =” http :// www . example . com /”> home </ a > becomes < a href =”// www . example . com /”> home </ a >.
This option makes links dependent on the protocol of the URL visited . For search engines and end users , it does not really matter which of the three options mentioned is used as search engine bots and browsers tend to be smart enough to figure out the final absolute URL . However , using option 2 is playing it safest .
●●WordPress
Websites running on the popular WordPress platform may find the Better Search Replace 6 WordPress plugin or the search and replace the database script 7 useful to quickly update any internal links within the database . Don ’ t forget to update theme files and general settings as well .
●●Internal redirects If any of the internal links point to an internal redirect to another internal URL , it is recommended to reduce the redirect chain , and instead improve the internal linking structure by linking it directly to the canonicals of the HTTPS end destination .
In addition , the internal linking structure needs to be updated to point to the right URLs to avoid any redirect chains ( see Figure 1 ). For example , avoid a situation where a HTTPS URL ( a ) links to a HTTP URL ( b ), which then redirects back to another HTTPS URL ( c ), or worse , back to the original HTTPS URL ( a ).
Figure 1 : Example of all redirects as found by DeepCrawl
●●Updating CDN settings Often links to assets are used to render a URL , such as Javascript , image and CSS files , which can be loaded from a content distribution network ( CDN ) that may or may not be under the control of the owner of the website . Any link references to the
assets loaded from the CDN need to be loaded from HTTPS . Also , in this case , it is possible to remove the protocol from the absolute URL , for example ,
< script src =” https :// ajax . googleapis . com / ajax / libs / jquery / 3.1.0 / jquery . min . js ”></ script > becomes < script src =”// ajax . googleapis . com / ajax / libs / jquery / 3.1.0 / jquery . min . js ”></ script >.
This means that the CDN needs to be enabled to serve the assets over HTTPS . If the CDN is mapped to a subdomain of the website , and most likely , is under control of the owner of the website , then the same SSL certificates may need to be uploaded to the CDN and used for every request , depending on the type of SSL certificate .
If the original asset source file is accessible on the HTTPS version , and most often linked to the CDN version on HTTPS , it is important to canonicalize the CDN version on HTTPS back to the asset source file on the HTTPS version using HTTP headers . For example , the asset on the CDN linked from the HTTPS version : < img src =”// cdn . example . com / image1 . png ”
/> needs to return a link reference with a canonical to the asset source file on the HTTPS version in the HTTP header response , so
< https :// www . example . com / image1 . png />; rel =” canonical ”.
This will communicate to search engines that the asset source file on the HTTPS version is the original version and avoid
potential duplication issues . When updating the CDN settings , to avoid any weird potential conflicts on the website , be sure to remove the cached data at the CDN .
XML sitemaps Assuming there are XML sitemaps present before the move ( if not , be sure to create / export one based on the initial crawl ), this one has to be accessible on the HTTPs version . Leaving the original XML sitemaps live on the HTTP version makes it possible to track the indexation status on Google Search Console ( under Sitemaps ), which is useful as the old URLs get crawled and re-indexed on the HTTPS version ( see Figure 2 ).
Figure 2 : Example of number of URLs indexed by Google
Make sure no redirects or non-existing or non-indexable URLs are listed in the XML sitemaps on the HTTP version , just the canonicals of indexable pages . Otherwise , the submission versus indexed numbers become unreliable .
●●Updating XML sitemaps Next , copy the XML sitemaps of the HTTP version and save as new files . In the new XML sitemaps , change the protocol of each URL mentioned within the block . For example : < url > < loc > http :// www . example . com /</ loc > xhtml : link rel =” alternate ” hreflang =” x-default ” href =” http :// www . example . com /” /> < xhtml : link rel =” alternate ” hreflang =” es ” href =” http :// www . example . com / es /” /> < xhtml : link rel =” alternate ” hreflang =” fr ” href =” http :// www . example . com / fr /” /> < xhtml : link rel =” alternate ” media =” only screen and ( max-width : 640px )” href =” http :// m . example . com /” /> < image : image > < image : loc > http :// www . example . com / image . jpg </ image : loc > </ image : image > < video : video > < video : content _ loc > http :// www . example . com / video123 . flv </ video : content _ loc > </ video : video > </ url > Becomes < url >
6 https :// en-gb . wordpress . org / plugins / better-search-replace /
7 https :// interconnectit . com / products / search-and-replace-for-wordpress-databases /
10 iGB Affiliate Issue 62 APR / MAY 2017