Connect with us

SEO

Are Javascript Redirects SEO Friendly?

Published

on

Are Javascript Redirects SEO Friendly?

So, you want to implement JavaScript redirects, but you’re unsure how they work?

Yes, they are more challenging to implement than standard redirects.

Ideally, you should use 301s, 302s, or 307-based redirects for implementation. This is the usual best practice.

But…what if you don’t have that level of access? What if you have a problem with creating standard redirects in such a way that would be beneficial to the site as a whole?

This is where using JavaScript redirects comes in.

They are not a best practice that you should be using exclusively, however.

But there are some situations where you just cannot avoid using a JavaScript redirect.

The following is a basic primer on JavaScript redirects, when to use them, how to use them, and best practices you must use when utilizing these types of redirects for SEO.

What Are JavaScript Redirects?

JavaScript redirects, essentially, are one of several methods of informing users and web crawlers that a page is available in another location.

They are often used to inform users about changes in the URL structure, but they can be used for just about anything.

Most modern websites use these types of redirects to redirect to HTTPS versions of web pages.

Then, whenever somebody visits the original URL, the browser loads the JavaScript file and executes whatever code is inside of it. If the script includes instructions to open a different URL, it does this automatically.

Doing redirects in this manner is useful in several ways.

For instance, you can switch URLs without manually updating every single URL on your site. In addition, JavaScript redirects can make it easier for search engines to find your own content.

A Quick Overview Of Redirect Types

There are several basic redirect types, all of which are beneficial depending on your situation.

Server-side Redirects

Ideally, most redirects will be server-side redirects.

These types of redirects originate on the server, and this is where the server decides which location to redirect the user or search engine to when a page loads. And the server does this by returning a 3xx HTTP status code.

For SEO reasons, you will likely use server-side redirects most of the time. Client-side redirects have some drawbacks, and they are usually suitable for more specific situations.

Client-side Redirects

Client-side redirects are those where the browser is what decides the location of where to send the user to. You should not have to use these unless you’re in a situation where you don’t have any other option to do so.

Meta Refresh Redirects

The meta refresh redirect gets a bad rap and has a terrible reputation within the SEO community.

And for good reason: they are not supported by all browsers, and they can be confusing for the user. Instead, Google recommends using a server-side 301 redirect instead of any meta refresh redirects.

JavaScript Redirects

JavaScript redirects, however, utilize the JavaScript language to send instructions to the browser to redirect users to another URL. There is a prevailing belief that JavaScript redirects cause problems for SEO.

Although Google does have good JavaScript rendering capabilities these days, JavaScript can still present issues. This is true for other types of platforms also, such as Spotify and other ecommerce platforms.

If, however, you’re in a situation where you can only use a JavaScript redirect as your only choice, then you can only use JavaScript.

Also, Google’s Gary Illyes has stated as recently as 2020 that JavaScript Redirects “are probably not a good idea.”

Js redirects are probably not a good idea though.

— Gary 鯨理/경리 Illyes (@methode) July 8, 2020

Best Practices For SEO-Friendly JavaScript Redirects

Regardless of whether you are using traditional redirects or JavaScript redirects, there are several best practices you must follow in order to not mess things up for SEO.

These best practices include avoiding redirect chains and redirect loops.

What’s the difference?

Avoid Redirect Chains

A redirect chain is a long chain of redirect hops, referring to any situation where you have more than 1 redirect in a chain.

Example of a redirect chain:

Redirect 1 > redirect 2 > redirect 3 > redirect 4 > redirect 5

Why are these bad? Google can only process up to three redirects, although they have been known to process more.

Google’s John Mueller recommends less than 5 hops per redirect.

“It doesn’t matter. The only thing I’d watch out for is that you have less than 5 hops for URLs that are frequently crawled. With multiple hops, the main effect is that it’s a bit slower for users. Search engines just follow the redirect chain (for Google: up to 5 hops in the chain per crawl attempt).”

Ideally, webmasters will want to aim for no more than one hop.

What happens when you add another hop? It slows down the user experience. And more than five introduce significant confusion when it comes to Googlebot being able to understand your site at all.

Repairing redirect chains can take a lot of work, depending on their complexity and how you set them up.

But, the main principle driving the repair of redirect chains is: Just make sure that you complete two steps.

First, remove the additional hops in the redirect so that it’s under five hops.

Second, implement a redirect that redirects the former URLs

Avoid Redirect Loops

Redirect loops, by comparison, are essentially an infinite loop of redirects. These loops happen when you redirect a URL to itself. Or, you accidentally redirect a URL within a redirect chain to a URL that occurs earlier in the chain.

Example of a redirect loop: Redirect 1 > redirect 2 > redirect 3 > redirect 2

This is why oversight of website redirects and URLs are so important: You don’t want a situation where you implement a redirect only to find out 3 months down the line that the redirect you created months ago was the cause of issues because it created a redirect loop.

There are several reasons why these loops are disastrous:

Regarding users, redirect loops remove all access to a specific resource located on a URL and will end up causing the browser to display a “this page has too many redirects” error.

For search engines, redirect loops can be a significant waste of your crawl budget. They also create confusion for bots.

This creates what’s referred to as a crawler trap, and the crawler cannot get out of the trap easily unless it’s manually pointed somewhere else.

Fixing redirect loops is pretty easy: All you have to do is remove the redirect causing the chain’s loop and replace it with a 200 OK functioning URL.

Want To Use JavaScript Redirects For SEO? Not So Fast…

Be cautious about creating JavaScript redirects because they might not be the best solution for redirects, depending on what you have access to.

They should not be your go-to solution when you have access to other redirects because these other types of redirects are preferred.

But, if they are the only option, you may not be shooting yourself in the foot.

More resources: 


Featured Image: RoseRodionova/Shutterstock

window.addEventListener( ‘load’, function() {
setTimeout(function(){ striggerEvent( ‘load2’ ); }, 2000);
});

window.addEventListener( ‘load2’, function() {

if( sopp != ‘yes’ && addtl_consent != ‘1~’ && !ss_u ){

!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,’script’,
‘https://connect.facebook.net/en_US/fbevents.js’);

if( typeof sopp !== “undefined” && sopp === ‘yes’ ){
fbq(‘dataProcessingOptions’, [‘LDU’], 1, 1000);
}else{
fbq(‘dataProcessingOptions’, []);
}

fbq(‘init’, ‘1321385257908563’);

fbq(‘track’, ‘PageView’);

fbq(‘trackSingle’, ‘1321385257908563’, ‘ViewContent’, {
content_name: ‘are-javascript-redirects-seo-friendly’,
content_category: ‘technical-seo’
});
}
});

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

SEO

State Of Marketing Data Standards In The AI Era [Webinar]

Published

on

By

State Of Marketing Data Standards In The AI Era [Webinar]

Claravine and Advertiser Perceptions surveyed 140 marketers and agencies to better understand the impact of data standards on marketing data, and they’re ready to present their findings.

Want to learn how you can mitigate privacy risks and boost ROI through data standards?

Watch this on-demand webinar and learn how companies are addressing new privacy laws, taking advantage of AI, and organizing their data to better capture the campaign data they need, as well as how you can implement these findings in your campaigns.

In this webinar, you will:

  • Gain a better understanding of how your marketing data management compares to enterprise advertisers.
  • Get an overview of the current state of data standards and analytics, and how marketers are managing risk while improving the ROI of their programs.
  • Walk away with tactics and best practices that you can use to improve your marketing data now.

Chris Comstock, Chief Growth Officer at Claravine, will show you the marketing data trends of top advertisers and the potential pitfalls that come with poor data standards.

Learn the key ways to level up your data strategy to pinpoint campaign success.

View the slides below or check out the full webinar for all the details.

Join Us For Our Next Webinar!

SaaS Marketing: Expert Paid Media Tips Backed By $150M In Ad Spend

Join us and learn a unique methodology for growth that has driven massive revenue at a lower cost for hundreds of SaaS brands. We’ll dive into case studies backed by real data from over $150 million in SaaS ad spend per year.

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

SEO

GPT Store Set To Launch In 2024 After ‘Unexpected’ Delays

Published

on

By

GPT Store Set To Launch In 2024 After 'Unexpected' Delays

OpenAI shares its plans for the GPT Store, enhancements to GPT Builder tools, privacy improvements, and updates coming to ChatGPT.

  • OpenAI has scheduled the launch of the GPT Store for early next year, aligning with its ongoing commitment to developing advanced AI technologies.
  • The GPT Builder tools have received substantial updates, including a more intuitive configuration interface and improved file handling capabilities.
  • Anticipation builds for upcoming updates to ChatGPT, highlighting OpenAI’s responsiveness to community feedback and dedication to AI innovation.

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

SEO

96.55% of Content Gets No Traffic From Google. Here’s How to Be in the Other 3.45% [New Research for 2023]

Published

on

96.55% of Content Gets No Traffic From Google. Here's How to Be in the Other 3.45% [New Research for 2023]

It’s no secret that the web is growing by millions, if not billions of pages per day.

Our Content Explorer tool discovers 10 million new pages every 24 hours while being very picky about the pages that qualify for inclusion. The “main” Ahrefs web crawler crawls that number of pages every two minutes. 

But how much of this content gets organic traffic from Google?

To find out, we took the entire database from our Content Explorer tool (around 14 billion pages) and studied how many pages get traffic from organic search and why.

How many web pages get organic search traffic?

96.55% of all pages in our index get zero traffic from Google, and 1.94% get between one and ten monthly visits.

Distribution of pages by traffic from Content Explorer

Before we move on to discussing why the vast majority of pages never get any search traffic from Google (and how to avoid being one of them), it’s important to address two discrepancies with the studied data:

  1. ~14 billion pages may seem like a huge number, but it’s not the most accurate representation of the entire web. Even compared to the size of Site Explorer’s index of 340.8 billion pages, our sample size for this study is quite small and somewhat biased towards the “quality side of the web.”
  2. Our search traffic numbers are estimates. Even though our database of ~651 million keywords in Site Explorer (where our estimates come from) is arguably the largest database of its kind, it doesn’t contain every possible thing people search for in Google. There’s a chance that some of these pages get search traffic from super long-tail keywords that are not popular enough to make it into our database.

That said, these two “inaccuracies” don’t change much in the grand scheme of things: the vast majority of published pages never rank in Google and never get any search traffic. 

But why is this, and how can you be a part of the minority that gets organic search traffic from Google?

Well, there are hundreds of SEO issues that may prevent your pages from ranking well in Google. But if we focus only on the most common scenarios, assuming the page is indexed, there are only three of them.

Reason 1: The topic has no search demand

If nobody is searching for your topic, you won’t get any search traffic—even if you rank #1.

For example, I recently Googled “pull sitemap into google sheets” and clicked the top-ranking page (which solved my problem in seconds, by the way). But if you plug that URL into Ahrefs’ Site Explorer, you’ll see that it gets zero estimated organic search traffic:

The top-ranking page for this topic gets no traffic because there's no search demandThe top-ranking page for this topic gets no traffic because there's no search demand

This is because hardly anyone else is searching for this, as data from Keywords Explorer confirms:

Keyword data from Ahrefs' Keywords Explorer confirms that this topic has no search demandKeyword data from Ahrefs' Keywords Explorer confirms that this topic has no search demand

This is why it’s so important to do keyword research. You can’t just assume that people are searching for whatever you want to talk about. You need to check the data.

Our Traffic Potential (TP) metric in Keywords Explorer can help with this. It estimates how much organic search traffic the current top-ranking page for a keyword gets from all the queries it ranks for. This is a good indicator of the total search demand for a topic.

You’ll see this metric for every keyword in Keywords Explorer, and you can even filter for keywords that meet your minimum criteria (e.g., 500+ monthly traffic potential): 

Filtering for keywords with Traffic Potential (TP) in Ahrefs' Keywords ExplorerFiltering for keywords with Traffic Potential (TP) in Ahrefs' Keywords Explorer

Reason 2: The page has no backlinks

Backlinks are one of Google’s top three ranking factors, so it probably comes as no surprise that there’s a clear correlation between the number of websites linking to a page and its traffic.

Pages with more referring domains get more trafficPages with more referring domains get more traffic
Pages with more referring domains get more traffic

Same goes for the correlation between a page’s traffic and keyword rankings:

Pages with more referring domains rank for more keywordsPages with more referring domains rank for more keywords
Pages with more referring domains rank for more keywords

Does any of this data prove that backlinks help you rank higher in Google?

No, because correlation does not imply causation. However, most SEO professionals will tell you that it’s almost impossible to rank on the first page for competitive keywords without backlinks—an observation that aligns with the data above.

The key word there is “competitive.” Plenty of pages get organic traffic while having no backlinks…

Pages with more referring domains get more trafficPages with more referring domains get more traffic
How much traffic pages with no backlinks get

… but from what I can tell, almost all of them are about low-competition topics.

For example, this lyrics page for a Neil Young song gets an estimated 162 monthly visits with no backlinks: 

Example of a page with traffic but no backlinks, via Ahrefs' Content ExplorerExample of a page with traffic but no backlinks, via Ahrefs' Content Explorer

But if we check the keywords it ranks for, they almost all have Keyword Difficulty (KD) scores in the single figures:

Some of the low-difficulty keywords a page without traffic ranks forSome of the low-difficulty keywords a page without traffic ranks for

It’s the same story for this page selling upholstered headboards:

Some of the low-difficulty keywords a page without traffic ranks forSome of the low-difficulty keywords a page without traffic ranks for

You might have noticed two other things about these pages:

  • Neither of them get that much traffic. This is pretty typical. Our index contains ~20 million pages with no referring domains, yet only 2,997 of them get more than 1K search visits per month. That’s roughly 1 in every 6,671 pages with no backlinks.
  • Both of the sites they’re on have high Domain Rating (DR) scores. This metric shows the relative strength of a website’s backlink profile. Stronger sites like these have more PageRank that they can pass to pages with internal links to help them rank. 

Bottom line? If you want your pages to get search traffic, you really only have two options:

  1. Target uncompetitive topics that you can rank for with few or no backlinks.
  2. Target competitive topics and build backlinks to rank.

If you want to find uncompetitive topics, try this:

  1. Enter a topic into Keywords Explorer
  2. Go to the Matching terms report
  3. Set the Keyword Difficulty (KD) filter to max. 20
  4. Set the Lowest DR filter to your site’s DR (this will show you keywords with at least one of the same or lower DR ranking in the top 5)
Filtering for low-competition keywords in Ahrefs' Keywords ExplorerFiltering for low-competition keywords in Ahrefs' Keywords Explorer

(Remember to keep an eye on the TP column to make sure they have traffic potential.)

To rank for more competitive topics, you’ll need to earn or build high-quality backlinks to your page. If you’re not sure how to do that, start with the guides below. Keep in mind that it’ll be practically impossible to get links unless your content adds something to the conversation. 

Reason 3. The page doesn’t match search intent

Google wants to give users the most relevant results for a query. That’s why the top organic results for “best yoga mat” are blog posts with recommendations, not product pages. 

It's obviously what searchers want when they search for "best yoga mats"It's obviously what searchers want when they search for "best yoga mats"

Basically, Google knows that searchers are in research mode, not buying mode.

It’s also why this page selling yoga mats doesn’t show up, despite it having backlinks from more than six times more websites than any of the top-ranking pages:

Page selling yoga mats that has lots of backlinksPage selling yoga mats that has lots of backlinks
Number of linking websites to the top-ranking pages for "best yoga mats"Number of linking websites to the top-ranking pages for "best yoga mats"

Luckily, the page ranks for thousands of other more relevant keywords and gets tens of thousands of monthly organic visits. So it’s not such a big deal that it doesn’t rank for “best yoga mats.”

Number of keyword rankings for the page selling yoga matsNumber of keyword rankings for the page selling yoga mats

However, if you have pages with lots of backlinks but no organic traffic—and they already target a keyword with traffic potential—another quick SEO win is to re-optimize them for search intent.

We did this in 2018 with our free backlink checker.

It was originally nothing but a boring landing page explaining the benefits of our product and offering a 7-day trial: 

Original landing page for our free backlink checkerOriginal landing page for our free backlink checker

After analyzing search intent, we soon realized the issue:

People weren’t looking for a landing page, but rather a free tool they could use right away. 

So, in September 2018, we created a free tool and published it under the same URL. It ranked #1 pretty much overnight, and has remained there ever since. 

Our rankings over time for the keyword "backlink checker." You can see when we changed the pageOur rankings over time for the keyword "backlink checker." You can see when we changed the page

Organic traffic went through the roof, too. From ~14K monthly organic visits pre-optimization to almost ~200K today. 

Estimated search traffic over time to our free backlink checkerEstimated search traffic over time to our free backlink checker

TLDR

96.55% of pages get no organic traffic. 

Keep your pages in the other 3.45% by building backlinks, choosing topics with organic traffic potential, and matching search intent.

Ping me on Twitter if you have any questions. 🙂



Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

Trending