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
-
Alt text / internal linking
Hi everyone A question about best practice when linking from pictures on our homepage - hirespace.com We have an option of using divs with background images (nicer in terms of design) but it means that we can't use anchor text or alt text to show Google what these internal links are about. The other option is to use images which do not allow us as much flexibility in terms of CSS but would allow us to use alt text. There is also an opinion that we should have separate text links at the bottom of the homepage to get the anchor page in. What is best practice in this situation - is alt text worth sacrificing some CSS flexibility for? How important is anchor/alt text for internal linking? Thanks guys.
On-Page Optimization | | HireSpace0 -
Duplicate content shown in Google webmaster tools for 301 redirected URLs.
Why does Google webmaster tools shows 5 URLs that have been 301 redirected as having duplicate meta descriptions?
On-Page Optimization | | Madlena0 -
Can you 301 redirect to a page that has other pages 301 to it?
Two years ago updated url page to include better keywords and used a 301 redirect from the old page to the new. so www.example.com/keyword-1st-generation.html now points to ... www.example.com/keyword-2nd-generation.html That moved the pages up in ranking, but now have better kw for the url, so is it okay to redirect the /keyword-2nd-geration-html to www.example.com/keyword-3rd-generation.html And what is a good length of time before removing the 1st-generation url? It's been 3 years and there is no chance of using it again. Plus, no sign of it in analytics.
On-Page Optimization | | AllIsWell0 -
Internal Linking - in content vs navigation menu
Would like to get some thoughts on whether navigation menus or in-content links are best for internal linking, from an SEO standpoint. A few thoughts to get started with: For sites with a lot of content, you can have a navigation menu linking to your higher-level pages, then in-content links to deeper pages on your site. For smaller sites, this is not an option, as the navigation menu will probably link to all your important pages. You could add in-content links, but Google only counts the first link on the page, so the in-content links would be ignored if you'd already linked yp the page in your top nav menu. I can think of several possible reasons navigation menu links could be less desirable than in content links from a Google perspective. (They are sitewide boilerplate content without context.) If you setup your navigation structure based on what is best for the user, small sites don't have much wiggle room to optimize internal link structure, as all their money pages will be linked to from the top nav menu. Do you think Google prefers in content links to navigation menu links? If so, how do you get around the fact that for many sites, all their money pages are being linked to from their main navigation menu?
On-Page Optimization | | AdamThompson0 -
Quick Question on Redirects
This might be a silly question, but one important enough for me to ensure that I understand the best practice of URL redirects... I'm thinking of changing my URL's and hierachy of some of my WP subpages around, in order to logically fit the keyword into the url and place the subpage closer to the root domain. My question is, when doing this, can I simply edit the URL and create a redirect after the fact, essentially killing the old URL. Or, do I create the new page with the updated URL and hierarchy, keeping the old page live and intact, but have that 301 redirect to its new corresponding destination? Thanks
On-Page Optimization | | JayAdams320 -
To Many Links On Page
I'm having a problem on a crawl warning for our main site. The warning is that every one of my pages has to many links, a little over 1,000 on almost all of them. I think this is because our category list on our left hand sidebar has so many categories, and that sidebar appears on every last one of our pages even all the way into our products. Can anyone take a look and tell me if this is the reason why and what I could possibly do about this? Thanks in advance! www.Ocelco.com
On-Page Optimization | | Mike.Bean0 -
Too many links on a page?
On my blog posts, I have links to all the categories and months, dating back 5-6 years. This make the number of links on each blog page well over 100, which I understand might decrease the value of each page. Is there a problem with having more than 100 links on a page?
On-Page Optimization | | rdreich492 -
Duplicate Links
Hello, I am entering sitewide navigation that will go to primary seo pages. This is really for usability, not for link juice. I'm wondering if I should still link to these very important pages in my index page's content. Or if I should consider those navigation links strong enough. If I did link in the content, then I would have more than one link to the same page on my home page. Thanks Tyler
On-Page Optimization | | tylerfraser0