equinor / energyvision

Home of the equinor.com website
https://www.equinor.com
MIT License
34 stars 8 forks source link

Occurences of http #2496

Open BorghildSelle opened 2 months ago

BorghildSelle commented 2 months ago

5 SEO benefits of 301 HTTP to HTTPS redirect: Clear migration that helps Google understand all old URLs moved to new ones. Google trusts a 301 migration as it sees it as one big relocation from HTTP to HTTPS. Google perceives it as a normal generic site move and rankings aren’t negatively impacted. HTTPS websites perform better on Google since they are beneficial to users by providing extra security. 301 redirects ensure a proper indexation of your website by Google.

BorghildSelle commented 2 months ago

Task for : Add warning on external link sanity component about using http or uppercase. should have https and lowercase is done in connected PR #2503

padms commented 1 month ago

@meols We have added a check for external link field, if http:// is used, to avoid additional redirect to https://

Also, for existing external urls, we will run a script to replace http:// with https://

meols commented 1 month ago

Thanks @padms - I like this way of solving it, but currently there are some issues

image.png image.png
padms commented 1 month ago

@meols This is ready for a second review now.

meols commented 2 weeks ago

Thanks @padms - is it possible to give some hints to editors on what they need to fix? In this case/screenshot it actually took me a while to see that there were capital letters included in the url (which I didn't understand from the error message)

image.png

Not sure what you mean in the first bullet. Can or can't an external url (not equinor.com or satellite sites) have capital letters in the url for external link.

meols commented 2 weeks ago

@padms - also an additional question to confirm - will doing this change mean that we will have to manually rewrite the urls that currently are http or including capital letters to be able to edit and republish a page? E.g. YouTube links I assume and hope that we can just copy/paste.

padms commented 2 weeks ago

@meols We have a script that changes all the urls or( values ) that start with http: and replace it with https:// , no manual editing needed.

Fixed the error with the validation, should be working now. Regarding the first bullet, since we want all equinor.com and satellite urls strictly have lower case letters, I made the lowercase check in the url for our sites alone, not for the external websites (like https://docmap.equinor.com ) which might have uppercase letters in their url..

meols commented 2 weeks ago

@padms - the script from http to https I understand. But when it comes to uppercase and lowercase letters in urls, I am more hesitant if we should change it and wonder what will happen in the future (after implementing this) - both for existing external urls and new ones we add that are copied from their "original place" and used containing both uppercase and lowercase letters. Editors will probably use the links as they are received from stakeholders (copy/paste). Will these external urls then give an error message editors will struggle to understand and need to be manually edited to only contain lowercase letters - as I did for the last link on this page (with real examples).

image.png image.png
padms commented 2 weeks ago

@meols This error related to magazine page with tags is fixed now..

What has been done:

meols commented 1 week ago

@padms - I'm still not sure about the upper/lower case issue. How critical is it to impplement that? As far as I remember it is related to a few short urls to avoid a redirect chain redirecting from uppercase to lowercase. Could we rather just remove the redirect? Wouldn't any browser accept both lowercase and uppercase, so that we wouldn't need a redirect to handle it?

padms commented 1 week ago

@meols Both urls would be accepted with no doubt. Found this on google

For SEO purposes, it's generally recommended to use lowercase letters in URLs because it avoids confusion and ensures consistency. Different capitalizations can lead to duplicate content issues, which might impact search engine rankings.

padms commented 1 week ago

@meols The error message "Equinor URLs should contain lower case letter only" appears for all equinor.com and satellite sites urls when the contain uppercase letters

image.png

Urls like "https://www.equinor.com/magazine?tag=Our+energy+solutions" is allowed, as upper case letter after "?" is allowed and no redirect happens in such case.

Other websites like "docmap.equinor.com" are treated as external websites and uppercase validation is not done.

meols commented 1 week ago

Thanks @padms - if you recommend to do this it's fine with me. One question to the error message where we get two messages for one error (http); could we remove the first one - "Does not match...." An editor (me included) wouldn't know what that one means.

image.png
padms commented 6 days ago

@meols I gave a fix to remove the extra error which is another way of saying "http is not allowed" :P