After HTTPS upgrade, should I change all internal links, or a general 301 redirect is better?
-
I recently upgraded to https.
Of course most internal links of my old posts are still http.
So I set up a 301 redirect in order to make the old link works.
In terms od SEO this is good or it is better to update all the internal links to https, manually?
In that case can I do it in batch with a search/replace command in the phmyadmin database?
any other suggested method?
thank you
-
Hi again. I've seen it. Quite honestly I disagree with absolutes being a priority. The arguments, presented in that WBF don't really work for me against the pain in development (I believe she mentioned even more drawbacks). Also, from my experience I have not seen any (at all) benefits in any way (SEO or loading speed) from having absolutes, rather than relatives.
-
Interesting Giorgio, I hadn't seen that WBF before.
Absolutely no disrespect to Ruth but that's the first WBF I've disagreed with. The scraper risk is something I'm willing to take a gamble on for the benefits of relative links and the other points are moot if your website is setup correctly (htaccess deals with the potential for different versions of your domain and IMO canonicalization should always be used).
Going by that WBF, if your site is set up correctly with redirects and canonicalization, the only benefit here is if a scraper copies your site and there's a very slim chance of this actually happening.
-
but...
wait a minute. this Moz posts suggests keeping you links absolute is "a priority" , from a seo perspective.
under point 2):
https://moz.com/blog/relative-vs-absolute-urls-whiteboard-friday
-
Exactly how to implement it will depend on your CMS but basically, all you need to do is update the hyperlinks from showing the entire link path to a simple, relative one like the examples below.
Absolute Anchor Text
Relative Anchor Text
With hyperlinks, if you don't specify the full address path including http://www then the current website path will be added to the beginning. In this example, since there is no full and complete path before /contact, it's correctly assumed that the link is to point to http://www.example.com/contact.
This is important because it means no matter what changes you make to your domain (www to non-wwww, moving to https, moving the site to a new domain etc) the links will always work perfectly. If you use an absolute path, the minute your change anything about your domain, all the links break because they're manually pointed to the old one.
Here's a bit more info on the topic if the above is a little confusing. It's not a link to my site, just the first I found in a Google search
-
Thank you very much /Dmitrii.
Can I change them to relative?
How should I do?
-
Hi there.
So, you have all your links absolute? not relative? Gotta be painful to manage..
Well, anyway, to answer your question - the only bad part about not changing links to https would be that extra redirect. If your servers are good, fast and very reliable, nobody would probably even notice it. I would check loading speeds though, especially for mobiles.
Personally, I would change all links to relative and never worry about stuff like this. If you want to keep them absolute, then yes, I recommend changing them all. Just for clean conscious sake
About find-replace. That would depend on how your website is built. I assume you're talking about wordpress? Then yes, you should be able to. As long as you know where to search.
Cheers.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Onpage Optimisation Changes
Hi Guys, I love the SEO world I really do, but sometimes it can be quite confusing and even after 11 years and a few clients under my belt, I still have head-scratching days and this week has been one of them. It seem the rules surrounding onpage optimisation of keywords have changed quite a lot this year. Whilst, I understand blatantly sticking to a 3% keyword density rate for your keywords, hasn't been good practice for a while, and with RankBrain and machine learning, we have to pay attention to semantic words and phrases but it seems there is a new set of rules I haven't learnt yet. For example I had a client I was working on and we we noticed although they were ranking quite high for a keyword phrase, it wasn't actually mentioned in the text at all and so by adding it in a place it made sense, we should lift this and other keywords. Here is what happened, within a week their main keyword moved down from 1 to about 6 and the keyword that wasn't added moved from 4th to 23rd. After scratching my head and then going to full panic mode, I calmed down and looked at competitors, they didn't mention the word in the content either and so I decided to remove the one word we added to the text. The rankings came back overnight (well after doing a fetch as Google and getting to reindex). So if keyword density now is clearly NOT a metric to go on, how do we know the sweet spot? Do we use something like Ryte and make sure we using semantics and keywords within the average of the top ten? Does what Google deems important depend on the niche? Not a right or wrong answer here, just interested in your thoughts Regards Neil
On-Page Optimization | | nezona2 -
Linking back to the homepage im trying to rank - Using exact match anchor? Linking from footer?
Hello, Our site is an basically advertisements / listings website. Structure is as following <last 200="" adds=""> (homepage trying to rank) < category 1 > < category 1 > < category 1 > < category 1 > < category 1 ></last> My question - each of the categories links back within the menu back to homepage. The link text currently is last 200 adds. Can i use exact match anchor? Or should i use just last 200 ads? The issue is that one of my categorys (category 1) has already the exact match anchor im trying to rank for. So i can not use the same to link back to homepage. Im worried that google does not see any exact keyword anchor texts back to homepage hence will rank my homepage with lower strenght for that keyword . Im also worried that the category 1 page might now compete with the main homepage for this word (even tho at the moment category itself does not rank for this keyword) Can i link from footer back to homepage with an alternative keyword then to give some "context" to google more? Would this be spamming?
On-Page Optimization | | advertisingcloud0 -
Internal linking
Hi Guy's, Whats the best way to set internal links on your website: 1. href=: /page/
On-Page Optimization | | Happy-SEO
2. href=: https://domain.com/page/ Thanks!0 -
Two links to different page with same link label
What will be the impact in Google if I have two links in the same page pointing to different pages, but with the same label.
On-Page Optimization | | kjerstibakke0 -
No followed links, what happens to the PR?
Hi, I have read a few times, on here and other places that when a website applies a no follow tag to a link the PR is not retained but instead disappears (evaporates) thus neither website benefiting. Is that true? If so what is the actual benefit of no following a link?
On-Page Optimization | | Bondara0 -
302 Temporary Redirects
Hi, We currently have a number of 302 redirects set up on our e-commerce store that redirect from no forward slash at the end to a forward slash at the end of the url (see below). example: domain.com/treadmills
On-Page Optimization | | DustyBraband
Redirects to
domain.com/treadmills/ Am I correct in saying that this will not pass link juice and the redirects should be changed to 301's (or just removed?). Or are the two urls treated the same (with or without forward slash)? Thanks in advance! Regards,
Dusty0 -
Too Many On-Page Links
If a page has more than 100 links, rather than splitting up the page into multiple pages, is it ok to use name="robots" content="noindex, follow" />? The page in question lists links to articles so the page itself isn't that important to appear in serps, but the articles are the helpful content pages: www.ides.com/articles/processing/injection-molding/
On-Page Optimization | | Prospector-Plastics0 -
Site Wide Link
I have just run up the link explorer on my site and discovered that every page home page link points back with the text home - I assume this is bad in terms of SEO , my site name is ccie and I assumed that it put the site wide link of ccie to the entire site, however it seems to be the breadcrumb default of home which is doing it/. www.rogerperkin.co.uk/ccie Should I be looking to change this so my top keyword points back from each page to the home page. I am running wordpress and assumed the site name was the home link on all pages. Can anyone advise the best practice? Thanks
On-Page Optimization | | rogerp0070