<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Colin McDermott</title>
    <description>The latest articles on DEV Community by Colin McDermott (@colinmcdermott).</description>
    <link>https://dev.to/colinmcdermott</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F231216%2Fbd484993-869a-438e-9c9f-3bd22f1a354e.jpg</url>
      <title>DEV Community: Colin McDermott</title>
      <link>https://dev.to/colinmcdermott</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/colinmcdermott"/>
    <language>en</language>
    <item>
      <title>Telegram Channel Developer Cheatsheet</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Wed, 09 Aug 2023 00:21:37 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/telegram-channel-developer-cheatsheet-bci</link>
      <guid>https://dev.to/colinmcdermott/telegram-channel-developer-cheatsheet-bci</guid>
      <description>&lt;h3&gt;
  
  
  Setting Up a Telegram Channel
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Start: Open Telegram and tap the hamburger menu (≡) or the pencil icon (on mobile).&lt;/li&gt;
&lt;li&gt; Choose Channel Type: "New Channel".&lt;/li&gt;
&lt;li&gt; Name &amp;amp; Photo: Set a name, add a photo, and write a brief description.&lt;/li&gt;
&lt;li&gt; Type:

&lt;ul&gt;
&lt;li&gt;  Public: Unique username, can be found through Telegram search.&lt;/li&gt;
&lt;li&gt;  Private: Generates a link; whoever has the link can join.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Managing Your Channel
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Add Admins:

&lt;ul&gt;
&lt;li&gt;  Go to Channel Info &amp;gt; Administrators &amp;gt; Add Admin.&lt;/li&gt;
&lt;li&gt;  Assign specific rights.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Manage Subscribers:

&lt;ul&gt;
&lt;li&gt;  View List: Channel Info &amp;gt; Subscribers.&lt;/li&gt;
&lt;li&gt;  Remove: Tap on a member &amp;gt; Remove.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Post Messages:

&lt;ul&gt;
&lt;li&gt;  Simply type and send in the message bar.&lt;/li&gt;
&lt;li&gt;  You can pin messages for visibility.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Edit Channel:

&lt;ul&gt;
&lt;li&gt;  Go to Channel Info &amp;gt; Edit (or the pencil icon).&lt;/li&gt;
&lt;li&gt;  Change name, photo, description, or type.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Enhancements
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Bots: Integrate bots to automate tasks.

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://controllerbot.me/"&gt;@ControllerBot&lt;/a&gt;: Schedule posts.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://manybot.io/"&gt;@Manybot&lt;/a&gt;: Custom commands and posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Link Channels: Share one channel's post to another.&lt;/li&gt;
&lt;li&gt; Discussion Groups: Link a group chat for members to discuss posts.

&lt;ul&gt;
&lt;li&gt;  Edit Channel &amp;gt; Discussion &amp;gt; Link Group.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Statistics: View detailed stats if your channel has over 1000 members.

&lt;ul&gt;
&lt;li&gt;  Channel Info &amp;gt; Statistics.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Safety &amp;amp; Privacy
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Turn On Two-Step Verification:

&lt;ul&gt;
&lt;li&gt;  Settings &amp;gt; Privacy and Security &amp;gt; Two-Step Verification.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Backup Channel:

&lt;ul&gt;
&lt;li&gt;  Regularly back up content and subscriber lists.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Limit Spam:

&lt;ul&gt;
&lt;li&gt;  Use bots like &lt;a href="https://botostore.com/c/shieldy_bot/"&gt;@Shieldy_bot&lt;/a&gt; to prevent spam in linked discussion groups.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Check Links: Before sharing, ensure links are safe.&lt;/li&gt;
&lt;li&gt; Restrict Forwarding: Limit the ability for subscribers to forward your posts to protect original content.&lt;/li&gt;
&lt;li&gt; Reporting: Encourage subscribers to report suspicious activity or spam.&lt;/li&gt;
&lt;li&gt; Silent Messages: Send a message without notification by holding the send button and selecting "Send without sound".&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Promoting Your Channel
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Share Link: Share the invite link on social media, websites, etc.&lt;/li&gt;
&lt;li&gt; Cross-Promotion: Collaborate with other channel admins to promote each other.&lt;/li&gt;
&lt;li&gt; Listing: Add your channel to Telegram directory websites like &lt;a href="https://tlgrm.eu/channels"&gt;tlgrm.eu/channels&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt; Engaging Content: Regular, valuable, and interactive content retains and attracts members.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Charging for access to your Telegram channel
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://whop.com/sell/telegram/"&gt;Whop Telegram Bot&lt;/a&gt;: Sell access to your channel.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Tools &amp;amp; Resources
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;a href="https://telegra.ph/"&gt;Telegra.ph&lt;/a&gt;: Create rich articles to share on Telegram.&lt;/li&gt;
&lt;li&gt; &lt;a href="https://telemetr.io/"&gt;Telemetr&lt;/a&gt;: Submit your channel.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Useful Commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  @channel: Notify all subscribers in a post.&lt;/li&gt;
&lt;li&gt;  #hashtag: Categorize and find related content.&lt;/li&gt;
&lt;li&gt;  $ticker: For stock or crypto channels, indicates a ticker symbol.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>mobile</category>
    </item>
    <item>
      <title>REST API Key Concepts and Requirements</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Fri, 21 Apr 2023 22:15:06 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/rest-api-key-concepts-and-requirements-j99</link>
      <guid>https://dev.to/colinmcdermott/rest-api-key-concepts-and-requirements-j99</guid>
      <description>&lt;p&gt;RESTful APIs are a type of web API, which can be understood as a gateway between clients and resources on the web. Clients, which could be a person or another software system, interact with resources, such as images, videos, text, numbers, or any type of data, through this API. &lt;/p&gt;

&lt;p&gt;This exchange is managed by the server, which is the machine providing the resource. APIs are designed to maintain security, control, and authentication, and they determine which clients get access to specific internal resources​​.&lt;/p&gt;

&lt;p&gt;REST, which stands for Representational State Transfer, is a software architectural style that provides guidelines for how an API should work. &lt;/p&gt;

&lt;p&gt;It was initially created to manage communication on complex networks like the internet, offering support for high-performing and reliable communication at scale. &lt;/p&gt;

&lt;p&gt;APIs that follow the REST architectural style are called REST APIs or RESTful APIs interchangeably. Web services implementing this architecture are referred to as RESTful web services​.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stateless
&lt;/h2&gt;

&lt;p&gt;Each request from the client must contain all the necessary information for the server to process the request. The server should not store any information about the client's state between requests, making the API &lt;a href="https://restfulapi.net/statelessness/"&gt;stateless&lt;/a&gt;. This principle allows for better scalability and easier maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Client-Server Architecture
&lt;/h2&gt;

&lt;p&gt;A REST API is based on a client-server architecture, where the client is responsible for the user interface and the server handles data storage and processing. This separation of concerns allows for improved flexibility, scalability, and maintainability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cacheability
&lt;/h2&gt;

&lt;p&gt;To optimize performance, REST APIs should support caching. Responses from the server should indicate whether they can be cached or not, so the client can reuse cached responses when appropriate. This reduces the load on the server and improves overall performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layered System
&lt;/h2&gt;

&lt;p&gt;A REST API should be built using a layered architecture, where each layer performs a specific function. This separation of concerns makes it easier to maintain and evolve the system over time. For example, an API might have a security layer, a business logic layer, and a data access layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uniform Interface
&lt;/h2&gt;

&lt;p&gt;A REST API should have a consistent and uniform interface, which simplifies its usage and makes it more intuitive. This involves using standard HTTP methods, clear resource naming conventions, and providing descriptive error messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code on Demand (optional)
&lt;/h2&gt;

&lt;p&gt;While not always implemented, REST APIs can support the ability to extend client functionality through downloadable code, such as JavaScript. This feature can be useful in specific scenarios but is not a mandatory requirement for a REST API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Idempotency
&lt;/h2&gt;

&lt;p&gt;Idempotent operations are those that can be performed multiple times without changing the result beyond the initial application. In the context of REST APIs, GET, PUT, and DELETE methods should be idempotent, ensuring that repeated requests have the same effect as a single request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resource Nesting
&lt;/h2&gt;

&lt;p&gt;In some cases, it makes sense to nest resources within other resources to represent relationships. For example, you might represent a user's comments on a blog post with a URL like /posts/123/comments. Use nesting sparingly and only when it reflects the natural hierarchy of the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filtering, Sorting, and Searching
&lt;/h2&gt;

&lt;p&gt;In addition to basic filtering and sorting, consider implementing more advanced search capabilities for your API, such as full-text search or complex querying. This allows clients to quickly locate and retrieve relevant resources.&lt;/p&gt;

&lt;p&gt;Also check out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/colinmcdermott/restful-api-design-cheatsheet-2ji6"&gt;RESTful API Design Cheatsheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/colinmcdermott/api-rate-limiting-cheat-sheet-409f"&gt;API Rate Limiting Cheat Sheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>programming</category>
    </item>
    <item>
      <title>API Rate Limiting Cheat Sheet</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Fri, 14 Apr 2023 23:10:21 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/api-rate-limiting-cheat-sheet-409f</link>
      <guid>https://dev.to/colinmcdermott/api-rate-limiting-cheat-sheet-409f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Jump to a section:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gateway-level rate limiting&lt;/li&gt;
&lt;li&gt;Token bucket algorithm&lt;/li&gt;
&lt;li&gt;Leaky bucket algorithm&lt;/li&gt;
&lt;li&gt;Sliding window algorithm&lt;/li&gt;
&lt;li&gt;Distributed rate limiting&lt;/li&gt;
&lt;li&gt;User-based rate limiting&lt;/li&gt;
&lt;li&gt;API key rate limiting&lt;/li&gt;
&lt;li&gt;Custom rate limiting&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Gateway-level rate limiting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Gateway-level rate limiting is a popular approach to rate limiting that allows developers to set rate limits at the gateway level.&lt;/li&gt;
&lt;li&gt;  Gateway-level rate limiting is typically implemented in API gateways such as &lt;a href="https://konghq.com/resources/videos/kong-gateway-for-beginners" rel="noopener noreferrer"&gt;Kong&lt;/a&gt;, &lt;a href="https://cloud.google.com/apigee" rel="noopener noreferrer"&gt;Google's Apigee&lt;/a&gt;, or &lt;a href="https://aws.amazon.com/api-gateway/" rel="noopener noreferrer"&gt;Amazon API Gateway&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Gateway-level rate limiting can provide simple and effective rate limiting, but may not offer as much fine-grained control as other approaches.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Token bucket algorithm
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xkvq6p3jr5y5lvcawb5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xkvq6p3jr5y5lvcawb5.png" alt="Token bucket algorithm"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.krakend.io/docs/throttling/token-bucket/" rel="noopener noreferrer"&gt;image source&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The &lt;a href="https://www.tutorialspoint.com/what-is-token-bucket-algorithm-in-computer-networks" rel="noopener noreferrer"&gt;token bucket algorithm&lt;/a&gt; is a popular rate limiting algorithm that involves allocating tokens to API requests.&lt;/li&gt;
&lt;li&gt;  The tokens are refilled at a set rate, and when an API request is made, it must consume a token.&lt;/li&gt;
&lt;li&gt;  If there are no tokens available, the request is rejected.&lt;/li&gt;
&lt;li&gt;  The token bucket algorithm is commonly used in many rate limiting libraries and tools, such as rate-limiter, redis-rate-limiter, and the Google Cloud Endpoints.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More: &lt;a href="https://dev.to/animir/token-bucket-vs-bursty-rate-limiter-a5c"&gt;Token Bucket vs Bursty Rate Limiter&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/animir"&gt;@animir&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Leaky bucket algorithm
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbb67qzhzc2nwjskrt6rf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbb67qzhzc2nwjskrt6rf.png" alt="Leaky bucket algorithm"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.mikeperham.com/2020/11/09/the-leaky-bucket-rate-limiter/" rel="noopener noreferrer"&gt;image source&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The &lt;a href="https://www.scaler.com/topics/leaky-bucket-algorithm/" rel="noopener noreferrer"&gt;leaky bucket algorithm&lt;/a&gt; is similar to the token bucket algorithm, but instead of allocating tokens, API requests are added to a "bucket" at a set rate.&lt;/li&gt;
&lt;li&gt;  If the bucket overflows, the requests are rejected.&lt;/li&gt;
&lt;li&gt;  The leaky bucket algorithm can be useful for smoothing out request bursts, and for ensuring that requests are processed at a consistent rate.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Sliding window algorithm
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl72q9pqlfixsmo71pf6z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl72q9pqlfixsmo71pf6z.png" alt="Sliding window algorithm"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hackernoon.com/using-rate-limiting-algorithms-for-data-processing-pipelines" rel="noopener noreferrer"&gt;image source&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The &lt;a href="https://itnext.io/sliding-window-algorithm-technique-6001d5fbe8b3" rel="noopener noreferrer"&gt;sliding window algorithm&lt;/a&gt; is a rate limiting approach that involves tracking the number of requests made in a sliding window of time.&lt;/li&gt;
&lt;li&gt;  If the number of requests exceeds a set limit, further requests are rejected.&lt;/li&gt;
&lt;li&gt;  The sliding window algorithm is commonly used in many rate limiting libraries and tools, such as Django Ratelimit, Express Rate Limit, and the Kubernetes Rate Limiting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More: &lt;a href="https://dev.to/satrobit/rate-limiting-using-the-sliding-window-algorithm-5fjn"&gt;Rate limiting using the Sliding Window algorithm&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/satrobit"&gt;@satrobit&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Distributed rate limiting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  For high-traffic APIs, it may be necessary to implement rate limiting across multiple servers.&lt;/li&gt;
&lt;li&gt;  Distributed rate limiting algorithms such as Redis-based rate limiting or Consistent Hashing-based rate limiting can be used to implement rate limiting across multiple servers.&lt;/li&gt;
&lt;li&gt;  Distributed rate limiting can help to ensure that rate limiting is consistent across multiple servers, and can help to reduce the impact of traffic spikes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this example, we'll create a simple Next.js application with a rate-limited API endpoint using Redis and Upstash. Upstash is a serverless Redis database provider that allows you to interact with Redis easily and cost-effectively.&lt;/p&gt;

&lt;p&gt;First, let's create a new Next.js project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-next-app redis-rate-limit-example
&lt;span class="nb"&gt;cd &lt;/span&gt;redis-rate-limit-example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the required dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;upstash-redis@0.4.4 ioredis@4.27.6 express-rate-limit@5.3.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a .env.local file in the project root to store your Upstash Redis credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPSTASH_REDIS_URL=your_upstash_redis_url_here
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;your_upstash_redis_url_here&lt;/code&gt; with your actual Upstash Redis URL.&lt;/p&gt;

&lt;p&gt;Create a new API route in &lt;code&gt;pages/api/limited.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;connectRedis&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../../lib/redis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;rateLimit&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express-rate-limit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createError&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;micro&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;redisClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;connectRedis&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rateLimiter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;rateLimit&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;store&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RedisStore&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;redisClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;windowMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 1 minute&lt;/span&gt;
  &lt;span class="na"&gt;max&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// limit each IP to 5 requests per minute&lt;/span&gt;
  &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;429&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Too many requests, please try again later.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;rateLimiter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;createError&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HttpError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;statusCode&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Internal server error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Success! Your request was not rate-limited.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;api&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;bodyParser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a &lt;code&gt;lib/redis.js&lt;/code&gt; file to handle Redis connections:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Redis&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ioredis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;cachedRedis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;connectRedis&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cachedRedis&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;cachedRedis&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Redis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UPSTASH_REDIS_URL&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;cachedRedis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new RedisStore class in &lt;code&gt;lib/redis-store.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;connectRedis&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./redis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RedisStore&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;connectRedis&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EX&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ttl&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;resetKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;del&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can test your rate-limited API endpoint by starting the development server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit &lt;code&gt;http://localhost:3000/api/limited&lt;/code&gt; in your browser or use a tool like Postman or curl to make requests. You should see the Success! Your request was not rate-limited. message. If you make more than 5 requests within a minute, you'll receive the rate limit message: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Too many requests, please try again later.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  User-based rate limiting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Some APIs may require rate limiting at the user level, rather than the IP address or client ID level.&lt;/li&gt;
&lt;li&gt;  User-based rate limiting involves tracking the number of requests made by a particular user account, and limiting requests if the user exceeds a set limit.&lt;/li&gt;
&lt;li&gt;  User-based rate limiting is commonly used in many API frameworks, such as Django Rest Framework, and can be implemented using session-based or token-based authentication.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  API key rate limiting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  For APIs that require authentication with an API key, rate limiting can be implemented at the API key level.&lt;/li&gt;
&lt;li&gt;  API key rate limiting involves tracking the number of requests made with a particular API key, and limiting requests if the key exceeds a set limit.&lt;/li&gt;
&lt;li&gt;  API key rate limiting is commonly used in many API frameworks, such as Flask-Limiter, and can be implemented using API key-based authentication.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Custom rate limiting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Finally, it's worth noting that there are many other rate limiting approaches that can be customized to suit the needs of a particular API.&lt;/li&gt;
&lt;li&gt;  Some examples include adaptive rate limiting, which adjusts the rate limit based on the current traffic load, and request complexity-based rate limiting, which takes into account the complexity of individual requests when enforcing rate limits.&lt;/li&gt;
&lt;li&gt;  Custom rate limiting approaches can be useful for optimizing the rate limiting strategy for a specific API use case.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For my latest project &lt;a href="https://www.pubindexapi.com/" rel="noopener noreferrer"&gt;Pub Index API&lt;/a&gt; I am making use of an API gateway for rate-limiting.&lt;/p&gt;

&lt;p&gt;More: &lt;a href="https://dev.to/colinmcdermott/restful-api-design-cheatsheet-2ji6"&gt;RESTful API Design Cheatsheet&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>programming</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>RESTful API Design Cheatsheet</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Sun, 09 Apr 2023 11:04:40 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/restful-api-design-cheatsheet-2ji6</link>
      <guid>https://dev.to/colinmcdermott/restful-api-design-cheatsheet-2ji6</guid>
      <description>&lt;p&gt;RESTful API design is a complex process that involves many factors, including scalability, performance, security, and user experience. This cheat sheet provides a quick reference for best practices and common pitfalls to avoid when designing RESTful APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTTP request methods
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods" rel="noopener noreferrer"&gt;HTTP request methods&lt;/a&gt;/HTTP verbs are used to perform operations on resources in a RESTful API. Each HTTP verb has a specific purpose, and using them correctly is essential for API consistency and security. Here are the most common HTTP verbs and their usage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  GET: retrieve a resource&lt;/li&gt;
&lt;li&gt;  POST: create a new resource or perform an action on a resource&lt;/li&gt;
&lt;li&gt;  PUT: update an existing resource&lt;/li&gt;
&lt;li&gt;  PATCH: partially update an existing resource&lt;/li&gt;
&lt;li&gt;  DELETE: delete a resource&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Naming Conventions
&lt;/h2&gt;

&lt;p&gt;Resource &lt;a href="https://restfulapi.net/resource-naming/" rel="noopener noreferrer"&gt;naming conventions&lt;/a&gt; are crucial for API readability and usability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use plural nouns for collections of resources (e.g., /users)&lt;/li&gt;
&lt;li&gt;  Use singular nouns for individual resources (e.g., /users/123)&lt;/li&gt;
&lt;li&gt;  Use lowercase letters and hyphens for resource names (e.g., /users/123/orders)&lt;/li&gt;
&lt;li&gt;  Use nouns instead of verbs in resource names (e.g., /orders/123 instead of /get-order/123)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resource Pagination
&lt;/h2&gt;

&lt;p&gt;Resource pagination is necessary when dealing with large collections of resources.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use limit and offset parameters for pagination (e.g., /users?limit=10&amp;amp;offset=20)&lt;/li&gt;
&lt;li&gt;  Use a default limit and let the client control the offset&lt;/li&gt;
&lt;li&gt;  Include pagination metadata in the response headers (e.g., X-Total-Count)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Error Responses
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.baeldung.com/rest-api-error-handling-best-practices" rel="noopener noreferrer"&gt;Error responses&lt;/a&gt; are crucial for API usability and should be consistent across the API.&lt;/p&gt;

&lt;p&gt;Use HTTP status codes to indicate the error type (e.g., 400 for bad request, 401 for unauthorized, 404 for not found, 500 for internal server error)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Include a descriptive error message in the response body&lt;/li&gt;
&lt;li&gt;  Use a consistent error format across the API&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Authentication and Authorization
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.blog/2021/10/06/best-practices-for-authentication-and-authorization-for-rest-apis/" rel="noopener noreferrer"&gt;Authentication and authorization&lt;/a&gt; are essential for API security.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use a secure authentication mechanism (e.g., OAuth 2.0, JWT)&lt;/li&gt;
&lt;li&gt;  Use HTTPS for secure communication&lt;/li&gt;
&lt;li&gt;  Use role-based access control (RBAC) to restrict access to resources&lt;/li&gt;
&lt;li&gt;  Use appropriate scopes to restrict access to specific actions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Versioning
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.xmatters.com/blog/blog-four-rest-api-versioning-strategies/" rel="noopener noreferrer"&gt;API versioning&lt;/a&gt; is necessary when changes are made to the API, and backward compatibility needs to be maintained.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use a version number in the URI (e.g., /v1/users)&lt;/li&gt;
&lt;li&gt;  Use a version header in the request (e.g., Accept-Version: v1)&lt;/li&gt;
&lt;li&gt;  Deprecate old versions and provide a migration path&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Caching
&lt;/h2&gt;

&lt;p&gt;Caching can improve API performance and reduce server load. Here are some best practices for API caching:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use appropriate cache headers (e.g., Cache-Control, Expires)&lt;/li&gt;
&lt;li&gt;  Use ETags for resource validation&lt;/li&gt;
&lt;li&gt;  Consider using a content delivery network (CDN) for caching&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  HATEOAS
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://restfulapi.net/hateoas/" rel="noopener noreferrer"&gt;HATEOAS&lt;/a&gt; (Hypermedia as the Engine of Application State) is a RESTful API design principle that enables clients to discover and interact with resources dynamically.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Include links to related resources in the response&lt;/li&gt;
&lt;li&gt;  Use standard link relations (e.g., self, next, prev)&lt;/li&gt;
&lt;li&gt;  Use media types that support hypermedia (e.g., HAL, JSON-LD)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Filtering and Sorting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Use query parameters for filtering (e.g., /users?status=active)&lt;/li&gt;
&lt;li&gt;  Use query parameters for sorting (e.g., /users?sort=name_asc)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rate Limiting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Use HTTP headers to communicate rate limits (e.g., X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset)&lt;/li&gt;
&lt;li&gt;  Apply rate limiting based on client IP, authenticated user, or API key&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Content Negotiation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Use the Accept header to specify desired response format (e.g., application/json)&lt;/li&gt;
&lt;li&gt;  Use the Content-Type header to specify the format of the request payload (e.g., application/json)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  API Documentation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Provide clear and comprehensive documentation&lt;/li&gt;
&lt;li&gt;  Use tools like Swagger/OpenAPI or RAML for API documentation&lt;/li&gt;
&lt;li&gt;  Include examples for different request scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  CORS (Cross-Origin Resource Sharing)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Implement CORS headers to control which domains can access your API&lt;/li&gt;
&lt;li&gt;  Use Access-Control-Allow-Origin, Access-Control-Allow-Methods, Access-Control-Allow-Headers, and Access-Control-Max-Age headers as needed&lt;/li&gt;
&lt;li&gt;  Ensure that preflight requests (OPTIONS) are properly handled&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  API Monitoring and Testing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg031ww97gkr7xcru5g4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg031ww97gkr7xcru5g4b.png" alt="API Monitoring"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have recently been using a service called Checkly, combined with Instatus for my API monitoring/status alerting. You can view my &lt;a href="https://pubindexapi.instatus.com/" rel="noopener noreferrer"&gt;status page here&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Monitor API performance and uptime&lt;/li&gt;
&lt;li&gt;  Use tools like Postman, Insomnia, or curl for manual testing&lt;/li&gt;
&lt;li&gt;  Implement automated testing for critical API functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I put together this REST API cheatsheet to assist with the production/planning of my own &lt;a href="https://docs.pubindexapi.com/" rel="noopener noreferrer"&gt;API documentation&lt;/a&gt;, hopefully it is useful for someone reading.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>The 9 Key Questions for Google's Helpful Content Update</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Sat, 27 Aug 2022 22:39:00 +0000</pubDate>
      <link>https://dev.to/searchcandy/the-9-key-questions-for-googles-helpful-content-update-3inc</link>
      <guid>https://dev.to/searchcandy/the-9-key-questions-for-googles-helpful-content-update-3inc</guid>
      <description>&lt;p&gt;Google's new AI powered &lt;a href="https://developers.google.com/search/blog/2022/08/helpful-content-update"&gt;Helpful Content Update&lt;/a&gt; is rolling out right now.&lt;/p&gt;

&lt;p&gt;SEO experts are predicting it could be quite a big update.&lt;/p&gt;

&lt;p&gt;Planning a quick content audit is something you might want to consider.&lt;/p&gt;

&lt;p&gt;Here are the 9 questions Google recommend you ask in relation to your content.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the content primarily to attract people from search engines, rather than made for humans?&lt;/li&gt;
&lt;li&gt;Are you producing lots of content on different topics in hopes that some of it might perform well in search results?&lt;/li&gt;
&lt;li&gt;Are you using extensive automation to produce content on many topics?&lt;/li&gt;
&lt;li&gt;Are you mainly summarizing what others have to say without adding much value?&lt;/li&gt;
&lt;li&gt;Are you writing about things simply because they seem trending and not because you'd write about them otherwise for your existing audience?&lt;/li&gt;
&lt;li&gt;Does your content leave readers feeling like they need to search again to get better information from other sources?&lt;/li&gt;
&lt;li&gt;Are you writing to a particular word count because you've heard or read that Google has a preferred word count? (No, we don't).&lt;/li&gt;
&lt;li&gt;Did you decide to enter some niche topic area without any real expertise, but instead mainly because you thought you'd get search traffic?&lt;/li&gt;
&lt;li&gt;Does your content promise to answer a question that actually has no answer, such as suggesting there's a release date for a product, movie, or TV show when one isn't confirmed?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you run an ecommerce site we have put together a &lt;a href="https://www.searchcandy.uk/ecommerce/helpful-content-ecommerce/"&gt;guide to the Helpful Content Update&lt;/a&gt; that you can read here.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>seo</category>
    </item>
    <item>
      <title>Introduction to Amazon Advertising</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Fri, 12 Aug 2022 19:48:00 +0000</pubDate>
      <link>https://dev.to/searchcandy/introduction-to-amazon-advertising-4in0</link>
      <guid>https://dev.to/searchcandy/introduction-to-amazon-advertising-4in0</guid>
      <description>&lt;p&gt;Amazon dominates the &lt;a href="https://www.searchcandy.uk/category/ecommerce/"&gt;ecommerce&lt;/a&gt; market with over 300 million active users. Amazon has also become the de-facto &lt;em&gt;product search engine&lt;/em&gt; -- so much so that close to 75% of all USA consumers begin their product search journey on the Amazon.com marketplace.&lt;/p&gt;

&lt;p&gt;So, it is no wonder that Amazon Advertising (formerly &lt;em&gt;Amazon Marketing Services&lt;/em&gt;) is becoming an increasingly valuable tool for businesses of all sizes. A testimony to its popularity, Amazon Advertising generated a staggering &lt;a href="https://www.searchcandy.uk/ecommerce/amazon-ads-revenue/"&gt;£23 billion ($31 billion) in revenue in 2021&lt;/a&gt; as brands vied to increase their visibility, product awareness, and sales.&lt;/p&gt;

&lt;p&gt;Using Amazon Advertising, brands can promote their products through a plethora of sponsored campaign options - to gain visibility, brand awareness, and sales; and to make their product offerings stand out among their competitors.&lt;/p&gt;

&lt;p&gt;However, for the uninitiated, Amazon Advertising can be very complicated and ever-changing. Therefore, companies must stay on top of the latest changes and develop winning Amazon advertising strategies for their business.&lt;/p&gt;

&lt;p&gt;Read on for our introduction to Amazon Advertising.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon Advertising: Types of Ads
&lt;/h2&gt;

&lt;p&gt;The basic concept of Amazon Advertising is to increase visibility and sales on Amazon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.searchcandy.uk/wp-content/uploads/2022/04/amazon-ads-example.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0mSlYNF6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.searchcandy.uk/wp-content/uploads/2022/04/amazon-ads-example.png.webp" alt="Example of Amazon ads" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sponsored results on Amazon.co.uk
&lt;/h2&gt;

&lt;p&gt;Here is a quick rundown on the native Amazon advertising tools and options that are available to jumpstart any marketing campaign.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Sponsored Products: Such ads appear in shopping results and product detail pages as self-service ads.&lt;/li&gt;
&lt;li&gt; Sponsored Brands: This is a self-service way to advertise brands in shopping results, offering a custom headline, brand logo, and multiple product options.&lt;/li&gt;
&lt;li&gt; Sponsored Display: These self-service ads are designed based on Amazon shopping interests and automatically generate and target relevant audiences.&lt;/li&gt;
&lt;li&gt; Audio ads: Alexa-enabled devices, such as Echo and Fire TV, as well as mobile and desktop, play these ads on Amazon Music's free tier.&lt;/li&gt;
&lt;li&gt; Video ads: Video ads appear outside of video content, both on and off Amazon. The streaming TV ads appear on connected TV sets, channels, and networks. In addition, IMDb TV ads appear outside of video content.&lt;/li&gt;
&lt;li&gt; Custom advertisements: Amazon Ads account executives design these bespoke ads&lt;/li&gt;
&lt;li&gt; Amazon DSP: Amazon's demand-side platform enables programmatic buying of the display, video, and audio ads.&lt;/li&gt;
&lt;li&gt; Amazon Attribution: It measures how non-Amazon marketing drives results on Amazon.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.searchcandy.uk/wp-content/uploads/2022/04/related-ads.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j3RZM-1F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.searchcandy.uk/wp-content/uploads/2022/04/related-ads.png.webp" alt="Related product ads" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for successfully setting up Amazon ads
&lt;/h2&gt;

&lt;p&gt;Many factors go into successful Amazon advertising. First, of course, Keyword research helps identify winning keywords people use when looking for products. Based on this, marketers can create an optimized campaign to put things into action.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; KEYWORD RESEARCH: Identify the right keywords to target the customers. Maintain a Search term catalog based on current trends, own branded search terms, and competitor analysis.&lt;/li&gt;
&lt;li&gt; BIDDING: Use amazon's bidding system to get maximum returns on investment.

&lt;ul&gt;
&lt;li&gt;  &lt;em&gt;Automated campaigns&lt;/em&gt; use product-level bids and Amazon's algorithm to match advertisers with customers.&lt;/li&gt;
&lt;li&gt;  &lt;em&gt;Manual campaigns&lt;/em&gt; provide more control as it allows advertisers to specify a bid for each keyword, competitor product, or keyword.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; AD CREATIVES: Develop ad copy and images that stand out from the competition. Focus on A+ brand content and focus on Reviews and Reviews to drive growth.&lt;/li&gt;
&lt;li&gt; REPORTING, ANALYTICS: Closely monitor the Amazon advertising campaigns to optimize results. And perform course correction and benchmarking as needed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  KPIs to focus on while advertising on Amazon
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  CTR (Click Through Rate)&lt;/li&gt;
&lt;li&gt;  ACoS (advertising cost of sales)&lt;/li&gt;
&lt;li&gt;  TACoS (total advertising cost of sales)&lt;/li&gt;
&lt;li&gt;  ROaS - Return on Advertising Spend&lt;/li&gt;
&lt;li&gt;  Search impressions&lt;/li&gt;
&lt;li&gt;  Conversion rate&lt;/li&gt;
&lt;li&gt;  CPC - Cost per Click&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We often get caught up in a variety of shiny new metrics that marketers love but let us not forget classics like &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/ctr/"&gt;click-through rate&lt;/a&gt; (CTR).&lt;/p&gt;

&lt;p&gt;A low CTR means that ads are not compelling enough for people who see them--and this could be leading companies down an unwanted advertising path!&lt;/p&gt;

&lt;p&gt;CTR remains the single most important KPI for most marketers while measuring ad effectiveness. The Click-through rate (CTR) is calculated by dividing an advertisement's clicks by impressions. For example, if an ad campaign gets 100 clicks for every 1000 impressions, the CTR will be 100/1000, i.e., 10%.&lt;/p&gt;

&lt;p&gt;When an ad does not successfully engage the buyer, it needs to be further optimized, or we should fix any lingering listing issues on the product detail page.&lt;/p&gt;

&lt;p&gt;For example, a low click-through rate means buyers are not finding what they want, so keyword targeting will be essential to see how great of an offer it is on Amazon.&lt;/p&gt;

&lt;p&gt;A few of the essential listing quality factors that affect Amazon CTR include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Main image quality&lt;/li&gt;
&lt;li&gt; Title quality&lt;/li&gt;
&lt;li&gt; Number of reviews&lt;/li&gt;
&lt;li&gt; Review score&lt;/li&gt;
&lt;li&gt; Fulfillment method (FBA or FBM)&lt;/li&gt;
&lt;li&gt; Pricing&lt;/li&gt;
&lt;li&gt; Ad Positioning&lt;/li&gt;
&lt;li&gt; Conversion Rate&lt;/li&gt;
&lt;li&gt; Earn A Best-Seller Badge&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Factors like A+ brand content, SEO optimization, reviews, and ratings are crucial factors -- and when they are optimized, Amazon ads tend to perform better. In addition, the higher a product ranks, the more effective the ad campaign becomes--- saving money and driving sales.&lt;/p&gt;

&lt;p&gt;Remember that the first step to success at Amazon is creating a helpful product page. Also, a general keyword, such as "shampoo" will not work as effectively as a specific one like "shampoo for men."&lt;/p&gt;

&lt;p&gt;However, the more detailed the keyword is, the higher the eventual search rank, CTR, and conversion rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon Ads vs. Google Ads
&lt;/h2&gt;

&lt;p&gt;Although every customer journey will differ from one brand to another, they are mostly made up of the following five stages: Awareness, Consideration, Retention, Decision, and Advocacy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; AMAZON: When someone searches Amazon, they are more likely to be at the end of their buyer's journey (i.e., close enough on a buying decision). This means that people who buy from Amazon already know what they want and need to find out whether any good deals are available!&lt;/li&gt;
&lt;li&gt; GOOGLE: With &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/google-ads/"&gt;Google&lt;/a&gt;, search queries cover diverse topics - covering all stages of a buyer's journey. As a result, the ad campaign strategy on Google can be much more flexible, targeting buyers at earlier stages of their journey. Nevertheless, not every buyer in the early part of the buyer's journey will be ready to buy in the near future (if at all).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Amazon is, therefore, a good (and perhaps optimal) advertisement tool for product-based companies because they can skip the initial stages and directly get in front of interested shoppers.&lt;/p&gt;

&lt;p&gt;So what does this mean for ecommerce marketers?&lt;/p&gt;

&lt;p&gt;First, Amazon advertising should be a top priority. By not utilizing Amazon's advertising platform, marketers are missing one of the world's largest marketplaces.&lt;/p&gt;

&lt;p&gt;And by not being up to date on the latest changes and strategies, they are putting their brands at a disadvantage against competitors.&lt;/p&gt;

&lt;p&gt;Related: check out our &lt;a href="https://www.searchcandy.uk/ecommerce/seo-guide/"&gt;in-depth guide to ecommerce SEO&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ecommerce</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>amazon</category>
    </item>
    <item>
      <title>How do you know if your ecommerce site is hit by a Google Core Update?</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Sun, 24 Jul 2022 13:00:00 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/how-do-you-know-if-your-ecommerce-site-is-hit-by-a-google-core-update-4k4h</link>
      <guid>https://dev.to/colinmcdermott/how-do-you-know-if-your-ecommerce-site-is-hit-by-a-google-core-update-4k4h</guid>
      <description>&lt;h2&gt;
  
  
  What are Core Updates?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Several times a year, we make significant, broad changes to our search algorithms and systems. We refer to these as "core updates." They're designed to ensure that overall, we're delivering on our mission to present relevant and authoritative content to searchers. These core updates may also affect Google Discover.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/search/blog/2019/08/core-updates"&gt;What site owners should know about Google's core updates @ Google&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few times a year Google push out &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/core-updates/"&gt;Core Updates&lt;/a&gt; which shake up search results with the aim of improving results for Google users.&lt;/p&gt;

&lt;p&gt;If you own or manage an ecommerce website's SEO, you may notice that your site has been impacted by a Google Core Update and wonder what you can do.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you know if your ecommerce website has been hit by a Core Update?
&lt;/h2&gt;

&lt;p&gt;Check your analytics and Search Console to see if you can pinpoint the approximate date your rankings/traffic was hit.&lt;/p&gt;

&lt;p&gt;Then see if this matches up with a date in a &lt;a href="https://moz.com/google-algorithm-change"&gt;list of algorithm/Google Core Updates&lt;/a&gt; or a recent update announced by Google's &lt;a href="https://twitter.com/searchliaison"&gt;Search Liaison on Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Google also recently released their own &lt;a href="https://developers.google.com/search/updates/ranking"&gt;list of Core Updates here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the symptoms of being hit by a Core Update?
&lt;/h2&gt;

&lt;p&gt;Usually you will see your rankings and traffic to your products and categories go down, and will mostly likely see a fall in sales also.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do about it?
&lt;/h2&gt;

&lt;p&gt;Make sure you are following all ecommerce SEO best practice by checking our &lt;a href="https://www.searchcandy.uk/ecommerce/seo-guide/"&gt;guide to ecommerce SEO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Google also have a &lt;a href="https://developers.google.com/search/docs/beginner/seo-starter-guide"&gt;guide to SEO basics&lt;/a&gt; you can read here.&lt;/p&gt;

&lt;p&gt;What we would recommend is to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not panic&lt;/li&gt;
&lt;li&gt;Improve the quality of your site&lt;/li&gt;
&lt;li&gt;Make sure your site does not have any technical issues&lt;/li&gt;
&lt;li&gt;Audit the quality of your content&lt;/li&gt;
&lt;li&gt;Audit your site for low quality pages that are unlikely to answer the queries they are trying to rank for&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We hope this quick guide was useful.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>seo</category>
      <category>ecommere</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What is Indexifembedded?</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Sat, 07 May 2022 22:52:51 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/what-is-indexifembedded-1ha1</link>
      <guid>https://dev.to/colinmcdermott/what-is-indexifembedded-1ha1</guid>
      <description>&lt;h2&gt;
  
  
  What is Indexifembedded?
&lt;/h2&gt;

&lt;p&gt;Indexifembedded is a new meta &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/robots-meta-tag/"&gt;robots&lt;/a&gt; value announced by Google in January 2022.&lt;/p&gt;

&lt;p&gt;The new robots value &lt;code&gt;indexifembedded&lt;/code&gt; can be used to indicate that the contents of a resource should be indexed if they are embedded in a webpage, even if there is also a robots &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/noindex/"&gt;&lt;code&gt;noindex&lt;/code&gt;&lt;/a&gt; present.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Today, we're introducing a new robots tag, &lt;a href="https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#indexifembedded"&gt;&lt;code&gt;indexifembedded&lt;/code&gt;&lt;/a&gt;, that brings you more control over when your content is indexed. With the &lt;code&gt;indexifembedded&lt;/code&gt; tag, you can tell Google you'd still like your content indexed when it's embedded through &lt;a href="https://developer.mozilla.org/docs/Web/HTML/Element/iframe"&gt;&lt;code&gt;iframes&lt;/code&gt;&lt;/a&gt; and similar HTML tags in other pages, even when the content page has the &lt;code&gt;noindex&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;indexifembedded&lt;/code&gt; tag addresses a common issue that especially affects media publishers: while they may want their content indexed when it's embedded on third-party pages, they don't necessarily want their media pages indexed on their own. Because they don't want the media pages indexed, they currently use a &lt;code&gt;noindex&lt;/code&gt; tag in such pages. However, the &lt;code&gt;noindex&lt;/code&gt; tag also prevents embedding the content in other pages during indexing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;Example usage using a meta tag:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;meta name="googlebot" value="indexifembedded" /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Code language: HTML, XML&lt;/p&gt;

&lt;p&gt;Example usage using a HTTP header:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;X-Robots-Tag: googlebot:noindex&lt;br&gt;
X-Robots-Tag: googlebot:indexifembedded&lt;br&gt;
...&lt;br&gt;
OR&lt;br&gt;
...&lt;br&gt;
X-Robots-Tag: googlebot:noindex,indexifembedded&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://developers.google.com/search/blog/2022/01/robots-meta-tag-indexifembedded"&gt;New robots tag: indexifembedded&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>html</category>
    </item>
    <item>
      <title>Introduction to Sentence-BERT (SBERT)</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Thu, 14 Apr 2022 22:05:02 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/introduction-to-sentence-bert-sbert-nd2</link>
      <guid>https://dev.to/colinmcdermott/introduction-to-sentence-bert-sbert-nd2</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;An introduction to Sentence-BERT by Ozan Yılmaz, an NLP engineer from Germany. This article was originally published on &lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/"&gt;Search Candy&lt;/a&gt;.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In October 2019 Google &lt;a href="https://blog.google/products/search/search-language-understanding-bert/"&gt;announced&lt;/a&gt; a new AI-based technology called &lt;a href="https://arxiv.org/abs/1810.04805"&gt;BERT&lt;/a&gt; to further improve their search results.&lt;/p&gt;

&lt;p&gt;BERT stands for '&lt;em&gt;Bidirectional Encoder Representations from Transformers&lt;/em&gt;' and is a language representation model which was trained with 3.3M English words.&lt;/p&gt;

&lt;p&gt;The huge difference between BERT and earlier versions of language models is that BERT 'understands' the context in which a word is used. To make this a bit clearer, let's look at the following two example sentences. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; "Bob is running a marathon."&lt;/li&gt;
&lt;li&gt; "Bob is running a company."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is easy for a human reader to understand that running has a completely different meaning in these examples, but for machines this task is far from trivial.&lt;/p&gt;

&lt;p&gt;Early models which were widely used until 2018 would have put both cases of 'running' into the same semantic box of 'walking fast', because it would be the most common usage.&lt;/p&gt;

&lt;p&gt;BERT on the other hand looks at the context of words before encoding their meaning into ones and zeros. This makes it a much more accurate and powerful algorithm for encoding natural languages.&lt;/p&gt;

&lt;p&gt;For BERT, it is clear that 'running' in example 2) implies that Bob leads a company and has nothing to do with the act of walking.&lt;/p&gt;

&lt;p&gt;After understanding what makes BERT so special, it is easy to see the value behind this technology for Google's search algorithms.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/2lR8Fzays4I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Not only does it improve the understanding of words in user inputs, but it also helps Google understand more natural user queries. In 2022, you don't have to explain your grandparents keyword-based search anymore.&lt;/p&gt;

&lt;p&gt;With the help of BERT, Google learns to understand whole sequences and their semantic connections.&lt;/p&gt;

&lt;p&gt;Nowadays, you can ask a question like 'What is the name of the movie where the little boy sees ghosts?' and get 'The Sixth Sense' as the first result, which is a perfectly fitting, and in this case correct, answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sentence-BERT (SBERT)&lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/#Sentence-BERT-SBERT"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;As good as it sounds, BERT is still not a solution for every kind of semantic search problem.&lt;/p&gt;

&lt;p&gt;Although it is a superb way to encode the meanings of words in a query, it doesn't perform well when it comes to comparing similarities of whole sentences.&lt;/p&gt;

&lt;p&gt;Reimers and his colleague Gurevych, the authors of the &lt;a href="https://arxiv.org/abs/1908.10084"&gt;Sentence-BERT paper&lt;/a&gt;, realized this early on and explain the problem with the following statement:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Finding the most similar pair in a collection of 10,000 sentences requires about 50 million inference computations (~65 hours) with BERT. The construction of BERT makes it unsuitable for semantic similarity [...]."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A few modifications and some more fine-tuning for semantic textual similarity help Sentence-BERT cut those 65 hours to about 5 seconds, which is an incredible performance boost.&lt;/p&gt;

&lt;p&gt;The difference to regular BERT is the idea to go one abstraction level further and encode the semantic meaning of the whole sentence instead of only encoding the individual words.&lt;/p&gt;

&lt;p&gt;The system's core still builds on the standard pre-trained BERT algorithm and derives its semantic power from it.&lt;/p&gt;

&lt;p&gt;So, in a scenario where you want to find the most similar headlines to a given one, you are better off utilizing the SBERT algorithm.&lt;/p&gt;

&lt;p&gt;At first glance this information might not seem valuable in the scope of SEO, but with new algorithms on the rise like &lt;a href="https://arxiv.org/abs/2004.12297"&gt;SMITH&lt;/a&gt;, which works similar to BERT but looks at longer contexts on document scale, getting a feel for SBERT might be a good thing to do.&lt;/p&gt;

&lt;p&gt;Fortunately, I conducted an experiment with SBERT to give you some insights and shed some light on the capacities of BERT-powered architectures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using SBERT to find similar asked questions&lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/#Using-SBERT-to-find-similar-asked-questions"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Given that we now know SBERT is much faster when it comes to comparing sentences, we will use this knowledge to identify questions from a database which are similar to a new question asked by the user.&lt;/p&gt;

&lt;p&gt;To do this, I downloaded a huge data dump from reddit's well-known subreddit '&lt;a href="https://www.reddit.com/r/explainlikeimfive/"&gt;Explain Like I'm Five&lt;/a&gt;' (ELI5) using a &lt;a href="https://github.com/facebookresearch/ELI5"&gt;script by Facebook&lt;/a&gt;. On ELI5 users can ask questions about all kinds of things and get layman-friendly answers. I filtered out the questions and encoded them with SBERT.&lt;/p&gt;

&lt;p&gt;In the next step I built an algorithm which utilizes the commonly used vector similarity measure '&lt;a href="https://en.wikipedia.org/wiki/Cosine_similarity"&gt;cosine-similarity&lt;/a&gt;' to compute 4 questions from my data dump that are most similar to my input question. To have a Baseline for comparison, I did the same experiment with an encoding strategy called &lt;a href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf"&gt;TF-IDF&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;TF-IDF encodings reflect how important a word is to a document in a collection or corpus. It is a quite naïve statistical method which operates on word-level and doesn't take semantics into account.&lt;/p&gt;

&lt;p&gt;In the following section I will discuss the results for two questions I asked and explain the underlying reasoning process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1 -- 'Is there racism in animals?'&lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/#Example-1-Is-there-racism-in-animals"&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Resulting similar questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;TF-IDF&lt;/th&gt;
&lt;th&gt;SBERT&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Why is there racism?&lt;/td&gt;
&lt;td&gt;Do animals express discrimination / racism based on the colour of fur / skin?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why is there racism?&lt;/td&gt;
&lt;td&gt;Do animals get embarrassed or feel shame?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why is racism still a thing?&lt;/td&gt;
&lt;td&gt;Why is incest breeding bad for animals?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why is racism so common?&lt;/td&gt;
&lt;td&gt;Are there murderers, psychopaths or other behavioral deviations commonly associated with human beings among animals?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The top similar question for SBERT gives the user exactly what he asked for, although the wording of the question is different.&lt;/p&gt;

&lt;p&gt;Here we can observe the power of SBERT: The sentences are compared using a deeper level of semantics, which helps the system understand the query in a much more advanced way, which is not possible for a simple TF-IDF model.&lt;/p&gt;

&lt;p&gt;The naïve system gets very focused on the word 'racism' and provides two top answers containing 'is there racism'. It is obvious that the TF-IDF search mechanism drops the important phrase 'in animals' in order to maximize the similarity between the sequences.&lt;/p&gt;

&lt;p&gt;This makes it clear that the baseline representation focuses on a word-level encoding structure and doesn't take the context into account.&lt;/p&gt;

&lt;p&gt;Further, we can see that SBERT even understands that racism has a negative connotation. This is the reason why it also lists other question results like 'Do animals get embarrassed or feel ashamed?'.&lt;/p&gt;

&lt;p&gt;This behavior is out of scope for a simple statistical model which was fitted on short questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2 -- 'Why didn't we already fly to Mars?'&lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/#Example-2-Why-didnt-we-already-fly-to-Mars"&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Resulting similar questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;TF-IDF&lt;/th&gt;
&lt;th&gt;SBERT&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Could we see "someone" on Mars?&lt;/td&gt;
&lt;td&gt;Why haven't we been able to land on Mars?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why not mars?&lt;/td&gt;
&lt;td&gt;Why haven't we put a man on Mars yet?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;How high can a fly fly?&lt;/td&gt;
&lt;td&gt;Why are we making our expedition to mars a one way trip?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why does it sometimes cost more to fly from A → B than it does to fly from A → B → C?&lt;/td&gt;
&lt;td&gt;Why do we need to go to Mars?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Once again the baseline model concentrates on the simple word-level concepts of 'flying' and 'mars', while SBERT gets the intention of the question and provides the user with fitting results regarding the topic 'travel of mankind to mars'.&lt;/p&gt;

&lt;p&gt;It's interesting to observe the interchangeable usage of 'already' and 'yet' between the second SBERT-provided question and the user query. This again shows the semantic power of the BERT architecture.&lt;/p&gt;

&lt;p&gt;As we can see, SBERT has the capacity to encode even granular semantic information on the sentence level and provides meaningful results when used for sentence similarity tasks.&lt;/p&gt;

&lt;p&gt;Given the fact that algorithms like SMITH are currently being developed, it could be possible that a sentence-level language model like SBERT could be implemented in Google's algorithm as well. But what does this power of BERT and BERT-like technologies mean for SEO?&lt;/p&gt;

&lt;h2&gt;
  
  
  Cutting Edge Language Technologies and SEO&lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/#Cutting-Edge-Language-Technologies-and-SEO"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Natural Language Processing made a huge forward leap with the introduction of BERT and there is no sign of slowing down.&lt;/p&gt;

&lt;p&gt;New papers are being released on a regular basis and the field is getting pushed more than ever by companies like Google, Facebook and Amazon.&lt;/p&gt;

&lt;p&gt;With this in mind, the challenge of SEO will change from caring about backlinks, keyword optimization, meta descriptions, etc., to actually &lt;em&gt;just&lt;/em&gt; generating quality content for users.&lt;/p&gt;

&lt;p&gt;People want to find precise and compact information when they search for something, and you need to be able to deliver exactly that.&lt;/p&gt;

&lt;p&gt;The times where we optimized for machines slowly comes to an end. In the future, machines will optimize for us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources&lt;a href="https://www.searchcandy.uk/nlp/sentence-bert/#Sources"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://blog.google/products/search/search-language-understanding-bert/"&gt;Google BERT announcement&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://arxiv.org/abs/1810.04805"&gt;BERT Paper&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://arxiv.org/abs/1908.10084"&gt;Sentence-BERT Paper&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://arxiv.org/abs/2004.12297"&gt;SMITH Algorithm Paper&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.reddit.com/r/explainlikeimfive/"&gt;Reddit ELI5 Subreddit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/facebookresearch/ELI5"&gt;Facebook ELI5 Project&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://en.wikipedia.org/wiki/Cosine_similarity"&gt;Cosine Similarity&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf"&gt;TF-IDF&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nlp</category>
      <category>machinelearning</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is a 308 Permanent Redirect?</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Sun, 10 Apr 2022 21:36:12 +0000</pubDate>
      <link>https://dev.to/searchcandy/what-is-a-308-permanent-redirect-321i</link>
      <guid>https://dev.to/searchcandy/what-is-a-308-permanent-redirect-321i</guid>
      <description>&lt;h2&gt;
  
  
  What is a 308 Permanent Redirect HTTP response?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;308 Permanent Redirect&lt;/strong&gt; is a server &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/http-status-codes/"&gt;HTTP response status code&lt;/a&gt; used for permanent redirection.&lt;/p&gt;

&lt;p&gt;A 308 HTTP response is near identical to a &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/http-301/"&gt;301&lt;/a&gt;, and has been confirmed to be treated as such by Google.&lt;/p&gt;

&lt;p&gt;The only notable difference between a 301 and 308 HTTP response is that a 308 does not allow changing the request method from POST to GET.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 308 Permanent Redirect Response
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;HTTP/1.1 308 Permanent Redirect&lt;br&gt;
Content-Type: text/html; charset=UTF-8&lt;br&gt;
Location: https://www.example.com/&lt;br&gt;
Content-Length: 356&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;&lt;br&gt;
&amp;lt;html&amp;gt;&lt;br&gt;
   &amp;lt;head&amp;gt;&lt;br&gt;
      &amp;lt;title&amp;gt;Permanent Redirect&amp;lt;/title&amp;gt;&lt;br&gt;
   &amp;lt;/head&amp;gt;&lt;br&gt;
   &amp;lt;body&amp;gt;&lt;br&gt;
      &amp;lt;p&amp;gt;&lt;br&gt;
         The document has been moved to &amp;lt;a href="https://www.example.com/"&amp;gt;https://www.example.com&amp;lt;/a&amp;gt;&lt;br&gt;
      &amp;lt;/p&amp;gt;&lt;br&gt;
   &amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  RFC
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://httpwg.org/specs/rfc7538.html"&gt;RFC7538&lt;/a&gt;, April 2015&lt;/p&gt;

&lt;h2&gt;
  
  
  Is a 308 response good for SEO?
&lt;/h2&gt;

&lt;p&gt;A 308 HTTP response has been confirmed by Google to be treated as identical to a 301 by its bots/algorithms.&lt;/p&gt;

&lt;p&gt;However a 308 response is still a newer and more unusual status code, so it is unknown how all search engines/bots around the world will treat it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-Standard Usage of 308 Status Code
&lt;/h2&gt;

&lt;p&gt;It should be noted that some sites may use a 308 status code in a non-standard way, such as in Google Drive - where a 308 Resume Incomplete status is used to indicate when an incomplete upload has stalled.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Ecommerce Navigation SEO Best Practice Guide</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Thu, 02 Dec 2021 13:25:13 +0000</pubDate>
      <link>https://dev.to/colinmcdermott/ecommerce-navigation-seo-best-practice-guide-2nkn</link>
      <guid>https://dev.to/colinmcdermott/ecommerce-navigation-seo-best-practice-guide-2nkn</guid>
      <description>&lt;p&gt;SEO is one of the most important channels in ecommerce, so it is vitally important you make your ecommerce site friendly to Google and other search engines if you want to reap some of that sweet organic traffic.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Essential reading&lt;/strong&gt;: Google recently published additional guidance for ecommerce site owners relating to navigation which can be found &lt;a href="https://developers.google.com/search/docs/advanced/ecommerce/help-google-understand-your-ecommerce-site-structure"&gt;here&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why is navigation important in ecommerce?
&lt;/h2&gt;

&lt;p&gt;The navigation menus and process of an ecommerce store can be super important: allowing both users and search engines to understand the structure/hierarchy of your store, enabling them to find their way around the different categories, sections and product offerings.&lt;/p&gt;

&lt;p&gt;For this reason it is important to spend a solid amount of time planning out navigation systems across the site, and of course a strong focus the primary navigation menu to ensure it effectively links to all the key areas of the store. Also to conduct testing to make sure that your navigation systems are functionable, accessible, and easy to use for both customers and search engine bots.&lt;/p&gt;

&lt;p&gt;A poorly designed, slow, or confusing navigation system can lead to both &lt;strong&gt;lower sales&lt;/strong&gt; as well as &lt;strong&gt;worse indexing &amp;amp; performance&lt;/strong&gt; in search engines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search Engine Friendly Ecommerce Navigation
&lt;/h2&gt;

&lt;p&gt;From an SEO perspective there are a few things you want to avoid if you want bots to be able to easily use your navigation.&lt;/p&gt;

&lt;p&gt;Most of the below tips are focused around the primary navigation menu. However we also drill down into a wide selection of specific navigation systems, providing advice and SEO considerations for each - as well as taking a look at all important mobile menus and Core Web Vitals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Text Based Links
&lt;/h3&gt;

&lt;p&gt;Navigation links should ideally always be &lt;a href="https://developers.google.com/search/docs/beginner/seo-starter-guide#use-text-for-navigation"&gt;text based&lt;/a&gt;, as opposed to using images, animations, or anything else too fancy that a search engine would struggle to read.&lt;/p&gt;

&lt;p&gt;So for example your design team may think it looks creative and cool to link to your toys category using only an animation of a spinning yo-yo - but to simply use the word "Toys" would be far more descriptive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Actual Links
&lt;/h3&gt;

&lt;p&gt;Google finds it easiest to understand actual HTML based links, using the &amp;lt;a&amp;gt; tag.&lt;/p&gt;

&lt;p&gt;Avoid using JavaScript based 'onclick' type links, and especially avoid using &amp;lt;buttons&amp;gt; as part of your navigation as these are designed for actions, &lt;a href="https://www.seroundtable.com/google-buttons-not-links-32282.html"&gt;not&lt;/a&gt; navigational links - and are not read by Google as links.&lt;/p&gt;

&lt;h3&gt;
  
  
  Content Hierarchy &amp;amp; Internal Linking
&lt;/h3&gt;

&lt;p&gt;Google looks at how many links different pages get and uses this information to assess which content is most important on your site.&lt;/p&gt;

&lt;p&gt;So it is a good idea to ensure the menu links to the most important areas of your site, and avoid pointing too many internal links towards areas which cannot be accessed or indexed by Google.&lt;/p&gt;

&lt;p&gt;So for example linking to your privacy policy as the first link in the navigation on every page might not be sensible, compared to linking to your primary ecommerce category.&lt;/p&gt;

&lt;p&gt;Similarly, as pleasing or easy to program as an alphabetical list may be, it may be more effective to order lists by popularity or choose the order manually.&lt;/p&gt;

&lt;p&gt;It is important to think about your most important keywords and products, then to make sure they are linked to with sufficient priority.&lt;/p&gt;

&lt;p&gt;Similarly think about sub-categories and any important areas. Can Google and users find their way to these pages quickly using the onsite navigation?&lt;/p&gt;

&lt;h3&gt;
  
  
  Overly Complex Navigation
&lt;/h3&gt;

&lt;p&gt;Google recommends avoiding overly complicated navigation which forces users to click dozens of times to get to a specific area or product, and going overboard with segmenting your content into too many niche categories to the point where navigation becomes more difficult.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Avoid:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating complex webs of navigation links, for example, linking every page on your site to every other page.&lt;/li&gt;
&lt;li&gt;Going overboard with slicing and dicing your content (so that it takes twenty clicks to reach from the homepage).
Source: &lt;a href="https://developers.google.com/search/docs/beginner/seo-starter-guide#createsimplenavpage"&gt;Google SEO Starter Guide&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Core Web Vitals &amp;amp; Ecom Navigation
&lt;/h2&gt;

&lt;p&gt;Following Google's &lt;a href="https://www.searchcandy.uk/website-speed-optimisation/core-web-vitals-update-may-2021/"&gt;page experience update&lt;/a&gt; - whereby fast and user-friendly sites are now eligible to get a boost in the search results - ensuring your navigation is fast loading and &lt;a href="https://web.dev/vitals/"&gt;Core Web Vitals&lt;/a&gt; friendly is very important for SEO.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cumulative Layout Shift (CLS)
&lt;/h3&gt;

&lt;p&gt;Navigation menus that are slow to load (even by just a few split seconds) can be the cause of &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/core-web-vitals/cumulative-layout-shift/"&gt;layout shifts&lt;/a&gt; that cause a bad experience for users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7qKhky-L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3968vb0yswu4nnl6pda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7qKhky-L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3968vb0yswu4nnl6pda.png" alt="Navigation menu causing CLS on a web page - From left to right" width="520" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Navigation menu causing CLS on a web page - From left to right&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As ecommerce site navigation often appears at the very top of a page, if the navigation bar or an important element inside it (such as an image, search box or icon) is slow to load - then consequently 'pops' into place - it is possible it will push all the other content on the page below it downwards creating an unpleasant layout shift.&lt;/p&gt;

&lt;p&gt;This could be caused by slow loading resources needed by the navigation, and/or by not properly instructing the browser how much space will be required by the navigation when it does eventually load.&lt;/p&gt;

&lt;h3&gt;
  
  
  First Input Delay (FID)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://web.dev/fid/"&gt;First Input Delay&lt;/a&gt; measures the delay from when a user attempts to interact with a webpage and the interaction starting.&lt;/p&gt;

&lt;p&gt;For example if a user were to click a link in a navigation menu, FID measures the delay in how long before the browser begins the process of fulfilling the request to load the new page.&lt;/p&gt;

&lt;p&gt;A delay may be caused by resources/elements on the page loading, or the 'main thread' being busy doing other work.&lt;/p&gt;

&lt;p&gt;As well as affecting SEO, the faster users are able to interact with navigational elements the faster they will be able to browse products - which is certain to directly impact sales.&lt;/p&gt;

&lt;p&gt;Spend a suitable amount of time testing, monitoring, and limiting the impact the navigation system has on your site's Core Web Vitals performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Types of Ecommerce Site Navigation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Navigation menu / mega menu&lt;/li&gt;
&lt;li&gt;Onsite Search&lt;/li&gt;
&lt;li&gt;Product filters&lt;/li&gt;
&lt;li&gt;Faceted navigation&lt;/li&gt;
&lt;li&gt;Breadcrumbs&lt;/li&gt;
&lt;li&gt;Static sitemaps&lt;/li&gt;
&lt;li&gt;Related products&lt;/li&gt;
&lt;li&gt;Language/location selector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The below header example from British ecommerce site Next.co.uk includes a navigation menu and onsite search box, as well as links to key pages such as the account login, checkout, and a language selector.&lt;/p&gt;

&lt;p&gt;See video at: &lt;a href="https://www.searchcandy.uk/wp-content/uploads/2021/11/next-menu.mp4"&gt;https://www.searchcandy.uk/wp-content/uploads/2021/11/next-menu.mp4&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Faceted Navigation &amp;amp; Product Filters
&lt;/h3&gt;

&lt;p&gt;Faceted navigation is one of the most complex and difficult areas of ecommerce SEO to get right.&lt;/p&gt;

&lt;p&gt;Whether to allow search engines to crawl and index all your product category filters and variations, and how to go about doing it, is a big decision for ecommerce sites - potentially opening up a site to hundreds of thousands, sometimes even millions of extra URLs/parameters for Google to assess.&lt;/p&gt;

&lt;p&gt;Some product filters may be worth indexing - such as the first level of a colour filter - but many other filters may not.&lt;/p&gt;

&lt;p&gt;There is no simple answer to recommend here and Google provide relatively scant resources to assist webmasters in this area, but we can point you towards this document published by Google which lists &lt;a href="https://developers.google.com/search/blog/2014/02/faceted-navigation-best-and-5-of-worst"&gt;5 of the best and worst&lt;/a&gt; practices when it comes to faceted navigation - and also this ecommerce &lt;a href="https://developers.google.com/search/docs/advanced/ecommerce/designing-a-url-structure-for-ecommerce-sites"&gt;URL structure best practice guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Breadcrumbs
&lt;/h3&gt;

&lt;p&gt;Breadcrumbs are an essential navigational element for any website or ecommerce store.&lt;/p&gt;

&lt;p&gt;Many ecommerce breadcrumb implementations fall down by either not existing at all, or by using a flat structure that misses out categories and sub-categories.&lt;/p&gt;

&lt;pre&gt;Home &amp;gt; Example Product&lt;/pre&gt;

&lt;p&gt;If your ecommerce breadcrumbs look like the above, they need work!&lt;/p&gt;

&lt;p&gt;Making sure to use the correct breadcrumbs markup is important, with a good implementation potentially being rewarded with breadcrumbs direct in Google search results.&lt;/p&gt;

&lt;p&gt;Breadcrumbs can be used on both product category pages and product pages.&lt;/p&gt;

&lt;p&gt;Google recommend using breadcrumbs that reflect a typical user path to a particularly product or URL, rather than simply mirroring the URL structure.&lt;/p&gt;

&lt;p&gt;So for example a bad breadcrumb structure (with multiple superfluous levels) might be:&lt;/p&gt;

&lt;pre&gt;Home &amp;gt; Shop &amp;gt; Products &amp;gt; ID &amp;gt; 343423 &amp;gt; Example Product&lt;/pre&gt;

&lt;h3&gt;
  
  
  Mega Menus
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wek-Hi6d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9yu01xga0lskepu9tpt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wek-Hi6d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9yu01xga0lskepu9tpt.png" alt="Asos.com women's clothing mega menu" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mega menus can be a great way of laying out your product categories and site architecture for users.&lt;/p&gt;

&lt;p&gt;Try to keep to the general principles laid out above, avoiding: overly complex navigation; linking to an excessive number of resources; and considering Core Web Vitals or usability issues.&lt;/p&gt;

&lt;p&gt;One of the primary SEO concerns with mega menus is undoubtedly the high risk of having an excessive number of linked resources.&lt;/p&gt;

&lt;p&gt;For example a menu that has 10 primary categories, each with on average 50 sub-categories/links, would have 500 total links just inside the primary navigation - something which would recur on every single ecommerce page on the website.&lt;/p&gt;

&lt;p&gt;Mega menus can also often be large and unwieldy, being almost always both powered by and heavily reliant on JavaScript resources which may be slow to load and render in the browser.&lt;/p&gt;

&lt;p&gt;Many sites also rely too heavily on mega menus for navigation. Consider the following test: could your users find their way to a specific category or product without using the mega menu? If the answer is no - it is highly likely the site has improvements to be made in terms of navigation and internal linking.&lt;/p&gt;

&lt;h3&gt;
  
  
  Onsite Search
&lt;/h3&gt;

&lt;p&gt;There are multiple ways potential customers may attempt to find their way around a website, and search based navigation is a method users may choose to utilise - especially if they feel like they are unable to quickly find their way to a resource using the existing navigational UI.&lt;/p&gt;

&lt;p&gt;An effective onsite search engine can allow users to quickly and easily find their way to appropriate products or categories.&lt;/p&gt;

&lt;p&gt;The Next search box functionality provides auto-complete suggestions before the user hits enter/taps to search - potentially reducing the user journey by one click or more. See the screenshot below for an example of this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6zyRByvF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ln1rlp9a54db23qea16l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6zyRByvF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ln1rlp9a54db23qea16l.png" alt="Next.co.uk auto-complete example. At this point the user has entered only 'Nike' into the search box, without hitting enter." width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another potentially good strategy is redirecting searches to specific products, ranges or category pages in some situations - which can save a step in the user journey if done effectively and without any frustrating errors.&lt;/p&gt;

&lt;p&gt;For example on a grocery ecommerce store a search for [vegan] could redirect users directly to the primary vegan range/category, rather than simply listing all search results that include the word 'vegan'.&lt;/p&gt;

&lt;p&gt;Blocking Search Results from Search Engines&lt;br&gt;
From an SEO perspective it is important to ensure that onsite search results pages are blocked from indexing by offsite search engines, such as Google and Bing.&lt;/p&gt;

&lt;p&gt;A robots.txt disallow rule is not strong enough here. A noindex based solution is going to be ideal for most situations - to fully prevent Google from indexing the results.&lt;/p&gt;

&lt;p&gt;Why is it important to block Google/search engines from search results pages? Allowing search results pages to get indexed can create an attack vector for hackers/spammers, as well as potentially causing SEO issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobile menus &amp;amp; navigation
&lt;/h3&gt;

&lt;p&gt;With the majority of visitors to ecommerce sites now being on mobiles for many sites and industries, and Google having moved firmly towards &lt;a href="https://www.searchcandy.uk/seo/seo-glossary/mobile-first-indexing/"&gt;mobile first indexing&lt;/a&gt;, getting your mobile menus right is vitally important for both users and SEO.&lt;/p&gt;

&lt;p&gt;There is a huge amount to consider when building and optimising a mobile navigation and menu system. It is worth considering that mobile navigation/UI includes more than just a standard mobile menu, especially on ecommerce sites.&lt;/p&gt;

&lt;p&gt;For example let's take a look at the UK fashion etailer Missguided.co.uk. Note before we even look at what most would consider standard mobile menu accessed via the hamburger icon, we can already navigate using swipeable sub-menu of trending/featured categories, breadcrumbs, links to important sub-categories with images, and a product filtering system.&lt;/p&gt;

&lt;p&gt;Having the mobile menu in a swipeable format in theory could save potential customers a click when accessing popular resources. It also means the links are in plain sight for both visitors and search engines.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTML Sitemap
&lt;/h3&gt;

&lt;p&gt;Internal linking is important for SEO, and a good HTML sitemap can potentially help with internal linking across an ecommerce site.&lt;/p&gt;

&lt;p&gt;Static sitemaps can also be useful for users who by last resort have been forced to use a sitemap to find their way around a large website.&lt;/p&gt;

&lt;p&gt;Tip: Neither users nor search engines should NEED to rely on HTML sitemaps to easily navigate a site. There should ideally already be an effective and intuitive to navigate UI, that doesn't require users to have to find what they need by browsing a large and cumbersome HTML sitemap.&lt;/p&gt;

&lt;p&gt;Sitemaps can be designed to cover an entire site, or just specific sections or page types. For example the Asos.com site features HTML sitemaps listing brands (see below).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XjK69PAP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qfr2e23hrtms2mccy6a8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XjK69PAP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qfr2e23hrtms2mccy6a8.png" alt="Asos HTML sitemap example" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>uiweekly</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What to do if your Development Site gets Indexed in Google</title>
      <dc:creator>Colin McDermott</dc:creator>
      <pubDate>Wed, 10 Nov 2021 23:08:41 +0000</pubDate>
      <link>https://dev.to/searchcandy/what-to-do-if-your-development-site-gets-indexed-in-google-134f</link>
      <guid>https://dev.to/searchcandy/what-to-do-if-your-development-site-gets-indexed-in-google-134f</guid>
      <description>&lt;p&gt;We take a look at what to do if your development/staging/testing site has been indexed in Google, including expert advice direct from a Google employee.&lt;/p&gt;

&lt;h2&gt;
  
  
  Oops! Our Dev site has been indexed in Google
&lt;/h2&gt;

&lt;p&gt;First of all, don't beat yourself up: a development site getting accidentally indexed in Google has happened at least once to every agency, developer, and inhouse team on the planet.&lt;/p&gt;

&lt;p&gt;Perhaps you found out about it via an angry email from your client or their SEO consultant, or maybe you discovered it yourself whilst checking for indexed pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did the dev site get indexed?
&lt;/h2&gt;

&lt;p&gt;If Google is able to find its way to your development site unimpeded, and finds there no instruction not to crawl or index the URLs available to it, there is a high chance Google will store the pages in their search engine for users to find.&lt;/p&gt;

&lt;p&gt;This can happen reasonably quickly - even if your dev site was only available for a few days or weeks - this could be enough time for Google to index the entire site.&lt;/p&gt;

&lt;p&gt;So if your development site does get indexed in Google, what can you do about it, and are there any urgent solutions for situations where for example the client or management is upset?&lt;/p&gt;

&lt;h2&gt;
  
  
  How to quickly remove a dev site from the Google index
&lt;/h2&gt;

&lt;p&gt;As recommended by Google's John Mu, if you find your staging site has been indexed and there is an urgent requirement to remove it, the quickest way to remove content from Google is to use the official 'Removals Tool' found in Search Console.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I'd do a site-removal request in search console - if the site is verified, it'll be hidden in search within less than a day. After that, you have time to figure out what to do for the long run.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;John Mu &lt;a href="https://www.reddit.com/r/TechSEO/comments/p85d9j/whoops_dev_site_indexed/h9nvtnb/"&gt;via&lt;/a&gt; TechSEO subreddit&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/h223mCgbmf4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Official video: Removals in Search Console - Daniel Waisberg&lt;/p&gt;

&lt;p&gt;To use the Removals tool you will first need to verify the specific domain you want to remove in Search Console if it is already verified.&lt;/p&gt;

&lt;p&gt;John goes on to offer some footnotes and warnings regarding use of the tool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you make a mistake and need to cancel a removal request, this process should be fast.&lt;/li&gt;
&lt;li&gt;Remember that removals apply to both www and non-www, and both http/https.&lt;/li&gt;
&lt;li&gt;Using the tool properly should clear the URL from Google for around 6 months.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After temporarily removing URLs from Google, it is sensible to then work towards a permanent removal.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to permanently remove a development or staging site from Google
&lt;/h2&gt;

&lt;p&gt;The most effective way to request Google no longer indexes a page is to either use a noindex command, or ensure the resource responds with a 410/404 HTTP response to indicate it is no longer available.&lt;/p&gt;

&lt;p&gt;Google have stated in the past that a noindex tag and 404/410 should work at the same speed.&lt;/p&gt;

&lt;p&gt;If Google returns to a resource following a temporary removal request and finds a 404/410 or noindex tag they will cancel the removal request as it is no longer needed.&lt;/p&gt;

&lt;p&gt;You could also set up authentication which would result in Google being unable to access a resource (eg with a 401 HTTP response).&lt;/p&gt;

&lt;p&gt;Using a robots.txt block is not a good solution if your site has already been indexed. It can take a long time to have any impact and is not a direct instruction to remove content from the index, so Google can ignore it and leave the page indexed if they wish.&lt;/p&gt;

&lt;p&gt;If your site is already indexed in Google, using a robots.txt rule to prevent Google crawling the site will also prevent them from seeing a noindex tag/header if you add one to a page.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to remove a development site from Google's cache
&lt;/h2&gt;

&lt;p&gt;Using the Removals Tool in Search Console will by default remove the URLs entirely, including the cache.&lt;/p&gt;

&lt;p&gt;When using the tool you are given the option to remove the cached URL - which will clear the snippet shown in search results - until the resource is recrawled and a new snippet will be shown.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to prevent a development site from getting indexed by Google
&lt;/h2&gt;

&lt;p&gt;To prevent your dev site getting indexed in Google there are a variety of methods you can use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication (password, IP address, CMS/plugin based, etc)&lt;/li&gt;
&lt;li&gt;Noindex tag or header&lt;/li&gt;
&lt;li&gt;Robots.txt disallow rule (least recommended option)
Google's John Mu recommends the use of server side authentication as the best method:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My recommendation is always to use server-side authentication for staging / dev sites, since it's obvious when it's blocked, and obvious when it's forgotten. Robots.txt and robots meta tags are easy to accidentally deploy to your live site.&lt;/p&gt;

&lt;p&gt;Note: Robots.txt is not a good option because it can be ignored by Google and other search engines.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to stop Google indexing a WordPress development site
&lt;/h2&gt;

&lt;p&gt;You can use any of the standard methods to stop Google indexing a WordPress staging site - eg password protection, noindex or blocking Google from crawling the site with robots.txt.&lt;/p&gt;

&lt;p&gt;The easiest method if you have access to the WordPress admin dashboard is to set WordPress to enable the 'Discourage search engines' option via Settings &amp;gt; Reading. This method should add a noindex tag to all your pages.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
