One place for hosting & domains

      Guide

      On-Page vs. Off-Page SEO: Complete Guide & Essential Tips


      Search Engine Optimization (SEO) is a complex and ever-evolving field that can certainly be confusing for beginners — and understandably so. With over 200 ranking factors and new “rules” being added by search engines all the time, it can be tough to know where to start.

      Well we’re here to shine the light on the situation for you. You see, there are two main “categories” of SEO — on-page and off-page. One refers to things you can directly control such as optimizing your website’s title tags and headings, while the other refers to external signals such as others linking to and sharing content from your site.

      When you understand the foundations of these distinct optimization types, you’ll be able to develop a comprehensive and balanced SEO strategy. Knowing how to cover all your bases, from image optimization to link building, can help ensure your site’s organic search success.

      In this complete guide, we’ll introduce you to SEO basics and explain the difference between on and off-page SEO. Then, we’ll share different ways you can improve both to boost your site’s rankings. Let’s get started!

      Why SEO Is Important for All Websites

      Before we get into the specifics of on-page and off-page SEO, let’s discuss the importance of search engine optimization more broadly.

      On a daily basis, the average online user will conduct a wide variety of searches on the web. From looking up directions to the nearest shoe store, to learning exactly how many steps are in the Eiffel Tower, most of us turn to the search bar as a reflex. In fact, more than 50% of online traffic comes from organic search.

      When it comes down to it, SEO is so important because all websites have the same goal – to be found and seen. A web page’s search rankings have the power to drive traffic, generate leads, and boost conversions. Therefore, SEO is relevant to almost every aspect of your online marketing strategy.

      The Difference Between On-Page and Off-Page SEO

      Now that we’ve covered the SEO basics, let’s dive into the differences between on-page and off-page SEO.

      What Is On-Page SEO?

      Also known as ‘on-site SEO’, on-page SEO is pretty self-explanatory. It refers to all the page ranking factors you can manipulate or optimize on your website. These elements can include the content on your product and service pages, blog posts, landing pages, and microsites.

      On-page SEO encompasses title tags, meta descriptions, heading structure, content, image optimization, accessibility, and overall website performance.

      What Is Off-Page SEO?

      As you might expect, off-page SEO or ‘off-site SEO’ includes all page ranking factors beyond your website.

      For instance, ‘backlinks’ (or ‘inbound’ links) are links on other web pages that direct back to your website. When your site has lots of backlinks from credible sites, they can benefit your search rankings because these pages can pass on some of their authority to you.

      This is a classic example of off-page SEO, but there’s more to it. Off-page SEO is not as straightforward as on-page SEO. However, it includes concrete SEO strategies for social media, domain authority, and more.

      Get Content Delivered Straight to Your Inbox

      Subscribe to our blog and receive great content just like this delivered straight to your inbox.

      10 Ways to Improve On-Page SEO

      It’s time to go into more detail for on-page SEO. Here are 10 factors to consider when optimizing your web pages for SEO!

      1. Create High Quality Content

      Creating high quality content is one of the most effective strategies for boosting your chances of appearing higher on Search Engine Results Pages (SERPs). After all, Google’s algorithms are designed to provide users with only the best and most relevant content.

      Keep in mind that quality includes everything from appearance to practicality. Your ultimate goal should be to create visually appealing, accurate content that will serve a useful purpose.

      For instance, if you are starting a blog, you might want to make sure you have a clear niche and stick to it. That way, you can work on growing your knowledge and establishing credibility in your subject area:

      gardening website example of high quality content

      Similarly, you’ll want to produce new blog posts regularly because readers and Googlebots alike favor fresh content. You may also want to develop a brand style guide and reference it when creating new content. This way, your audience can feel reassured by consistency.

      Calls to Action (CTAs) are also vital if you want your content to inspire your readers to make a move. Other indicators of high-quality material include images and reader-friendly text, but we’ll dive more into those later.

      2. Use Target Keywords

      Using target keywords on your page is one of the most straightforward SEO tactics you can implement. However, you’ll need to consider your intended audience before you can find target keywords.

      For example, if you run a craft blog, your ideal reader might be parents of children under 12. You could hone it down further to parents in the Pacific Northwest. Once you know your audience, you can find target keywords using tools such as Google Keyword Planner.

      You can start by introducing keywords that you anticipate your target audience may use. Then, see what similar words and phrases are produced. Choosing keywords with high monthly search volumes but low to medium competition is often best.

      It’s also wise to choose a diverse range of keyword types and lengths. For example, you may decide to use some shorter, medium-competition words. On top of that, you could select some lengthier keywords that are highly specific. These are called ‘long-tail keywords.’

      For example, if you run a candy store in Wisconsin, you might choose ‘candy shop’ and ‘candy store’. Then, for long-tail keywords, you could use ‘best candy shop in Milwaukee’:

      Google Ads Keyword Planner Tool
      Google Keyword Planner

      Once you have your keywords, you can place them anywhere on your site. You can add these phrases to blog posts, your About Us page description, product details, and anywhere else you like. However, you’ll want to avoid keyword stuffing.

      Essentially, you can use keywords anywhere you see text on the front end of your site. We’ll get into less visible locations for keywords later.

      3. Optimize Images

      Users prefer high-quality images, and search bots favor lightweight, SEO-optimized ones. Let’s consider a few ways you can ensure your photos are helping your search engine rankings.

      To start, it’s best if images are clear and high-resolution. Beyond that, you can compress image files so they are not large and heavy. Whenever possible, you may want to use a compression tool such as TinyPNG:

      TinyPNG online image compression tool

      This free tool enables you to shrink down PNG, JPG, and WebP files so that they don’t slow your site’s loading times (more on this later).

      Another simple way to optimize images is by adding ‘alt text’ (alternative text). Simply put, alt text is a summary of an image that users on the front end can’t see. It serves two essential purposes.

      Firstly, alt text increases your site’s accessibility by enabling users with impaired vision or complete loss of sight to interact with images. Assistive technologies (such as dictation tools) can help some visitors listen to the descriptions of your visual media files. Furthermore, bots can’t see pictures, but they can read the alt text.

      How you add alt text will depend on the Content Management System (CMS) you use. With WordPress, the process is simple. When editing your site in the Block Editor, just select the block for an image and find Alt text in its settings. Here, you can easily type in a brief image description and input some relevant keywords.

      4. Create Internal Links

      Whether you run a blog or a multi-page website, you will likely deal with many unique links. An ‘internal’ link is a URL that leads to another page on your website. For instance, you may have a footer with links to your blog, contact page, and other essential information.

      When creating your web pages, it’s a good idea to include internal links wherever possible. Of course, this process should always be done naturally. These internal links are crucial because web crawlers use them to jump from page to page while scanning information.

      In fact, if one of your web pages doesn’t have any internal links leading to it, it’s considered an ‘orphan page’. Search bots can’t find it. Therefore, it can’t be indexed, and it definitely can’t be ranked.

      Furthermore, internal links can keep users on your website for longer. This increased time on page may lead to conversions, lead generation, and more. Lastly, and most importantly, internal links help provide a positive UX.

      For instance, in a blog post explaining a complex subject, it might make sense to link to another one of your articles elaborating on a related concept. Additionally, internal links can help users navigate around your site as they search for specific details, such as contact information.

      5. Optimize Permalinks

      While we’re on the subject of URLs, let’s discuss permalinks. These are the permanent URLs that represent your pages, and they are also crucial for strong SEO.

      When creating new pages, you’ll want to ensure that your URLs are straightforward and intuitive. For example, if your domain is mywebsite.com, your other pages might have URLs like mywebsite.com/about and mywebsite.com/contact.

      If you run a blog, your URLs may need to explain more complex information, but remember to keep things simple.

      For instance, for an article titled “How to Declutter Your Bathroom in 10 Simple Steps”, using the full title would be too lengthy. Instead, you could use mywebsite.com/declutter-bathroom-guide.

      Using concise permalinks is best. In fact, certain ‘stop words’ (prepositions, articles, connectors) are ignored by search engine bots. Therefore, they should be left out. It’s also wise to include any relevant keywords in your permalinks.

      6. Consider Readability

      Whether your content is brief or lengthy, readability is an important ranking factor. Your articles and pages should be well-written. It’s best to write directly and concisely, using shorter sentences and vocabulary that fit your audience.

      Additionally, you can use headings and subheadings to organize your content. These elements are essential if you’re producing lengthy how-to guides or listicles:

      WordPress heading structure

      Headings also create more opportunities to insert relevant keywords. Furthermore, you’ll want to ensure that sections are neither too short nor too lengthy. Quality content tends to be skimmable without large blocks of text. You can also use those high-quality images we mentioned before to break up the text.

      7. Utilize Title Tags and Meta Descriptions

      Meta tags are bits of HTML code that signal to search engines how they should read your content.

      Title tags and meta descriptions are examples of these, and key for helping search engines understand how to rank your website’s content. These meta tags generate information that will appear to users in the search results and might encourage them to click on your page.

      Here’s an example of a title tag:

      example of title tag appearing in web browser tab

      Now let’s look lower down the page to see a meta description:

      meta description example in Google search results

      These elements are critical if you want to boost your search engine rankings. Without them, your page’s content will be advertised with a chunk of the first paragraph on the page. Furthermore, web users will have a hard time navigating back to your page when using multiple tabs in their browser.

      To easily add title tags and meta descriptions to your posts, you might want to try out a free WordPress SEO plugin. Yoast SEO and All In One SEO (AIOSEO) are popular choices.

      8. Monitor Site Performance 

      Site performance also plays a crucial role in search engine rankings. Here, we’re mainly talking about speed.

      As you can imagine, users looking at the search results don’t want to be led to pages that are slow or don’t work correctly. In fact, Google has created what it calls Core Web Vitals. It assesses page loading times, interactivity, and page stability to give you a Core Web Vitals score.

      If you’d like to check how your site performs, you can test it using tools such as Google PageSpeed Insights:

      Google PageSpeed Insights - Core Web Vitals Results

      Simply enter your website’s URL and see how it does. If your site needs some performance improvements, you can try implementing caching or lazy loading. Even better, you could ensure that your web host uses a Content Delivery Network (CDN), though this may require changing hosts.

       

      9. Prioritize User Experience (UX)

      As we approach the end of our on-page SEO strategies, it’s time to discuss UX. This concept is behind most other optimization tactics because the ultimate goal is to make a website more user-friendly.

      On top of quality, performance, readability, and strong internal linking, there are a few more specific ways to create a positive UX for your site’s visitors.

      A huge part of UX is linked to usability. Therefore, smooth navigation is particularly important.

      To make exploring a multi-page website easier, it’s best to use a prominent navigation menu either at the top or left of your page:

      example of accessible website navigation

      Additionally, you may want to create a search bar feature and include helpful links in your footer. All these elements help users navigate around your site without scrolling.

      10. Optimize Pages for Mobile Devices

      Last but not least, if you want your pages to rank at the top of the search engine results, they must be mobile-optimized. This is because most internet users prefer to use their smartphones or other handheld devices.

      There are currently more than 4.9 billion mobile internet users globally, and the number is growing. Therefore, it’s no surprise that Google declares mobile-friendliness a must for SEO. Plus, with the rise of m-commerce, any online businesses that neglect their mobile visitors are likely to miss out on significant sales.

      There are a few very simple ways to ensure your website is mobile-optimized. For starters, you can opt for a mobile-friendly WordPress theme. That way, you can set it and forget it.

      If you expect to customize your site extensively, you may want to use a WordPress page builder that has mobile previewing and modification settings:

      BeaverBuilder website page builder tool

      Beaver Builder is a popular choice that offers responsive designs and editing features. It’s also easy to use with a drag-and-drop interface.

      How to Improve Off-Page SEO (3 Essential Techniques)

      Now that you know everything about on-site SEO, let’s explore how you can improve your rankings by other means. Keep in mind that the following section is briefer, simply because you have more control over on-page than off-page SEO.

      1. Build Backlinks (Domain Authority)

      Backlinks to your site show Google that your content is credible. That’s why building backlinks can enhance your website’s ‘domain authority’. Your site accumulates a positive reputation through how many backlinks it has.

      Gaining backlinks takes time and quality content, but you can use some measures to actively participate in the process. For instance, you can write guest posts for other credible blogs in your niche and link to your content

      You can also monitor your site’s mentions online and request that any unlinked instances be credited. Furthermore, some common formats that get linked to include how-to guides, “best of” listicles, and even infographics.

      Ahrefs

      You’ll want to be careful not to participate in anything shady when building your inbound links because you can be penalized by Google. Since backlinks require time and effort, we recommend using tools such as Ahrefs, which has a backlink checker.

      2. Support Social Proof

      Another way to build trustworthiness is to provide simple evidence. ‘Social proof’ typically refers to things like reviews and testimonials.

      You can create a Google Business Profile for your company or website to gain social proof. This platform has a review feature built-in:

      Google Local Search results

      Other types of content marketing can also serve as social proof. For instance, conducting a survey and then publishing your findings is excellent evidence of your legitimacy and professionalism.

      Additional forms of social proof include testimonials and partnerships with other credible brands or individuals. For example, some companies collaborate with influencers in their niche to build more social proof.

      3. Grow Your Online Presence on Social Media

      On the subject of influencers, social media is perhaps one of the most important channels where e-commerce businesses can further build their off-page SEO.

      That’s because you can share quality content on any social media platforms you use. This material can include stunning images, target keywords, and links:

      Instagram business page

      Ultimately, social media is the place to build a brand, so we recommend developing an entirely separate (and complementary) social media strategy. All of these efforts will contribute to your off-page SEO because social media posts and pages can appear in search results.

      However, you’ll want to consider which platforms your target audience uses. For instance, if you are appealing to millennials, you might want to focus on Instagram. Whereas with a younger audience, you may prioritize creating content for TikTok.

      Improve Your Site’s Visibility Using On-Page and Off-Page SEO

      Search Engine Optimization (SEO) is a complex and dynamic field. That can make it challenging to get started with both on-page and off-page SEO strategies. However, it’s essential to prioritize these optimization methods to boost your website’s visibility.

      When it comes to on-page optimization, you can start small, implementing keywords, internal links, and high-quality content. Later, you can advance to elements such as title tags and meta descriptions. For off-page optimization, backlinks, testimonials, and a strong social media presence are essential.

      If you’re a beginner in SEO,  you might want to forget the site audits and leave them to the professionals. Check out our DreamHost Pro Services and free up your time to focus on the creative side of your business. We offer specific plans for SEO marketing that will help you rank higher on SERPs. Plus, we have an SEO toolkit to take your site to the next level!

      Search Engine Optimization Made Easy

      We take the guesswork (and actual work) out of growing your website traffic with SEO.

      shared hosting



      Source link

      Installing MySQL: A Definitive Guide


      MySQL is one of the most popular SQL-based relational databases. The Community Edition is available at no charge and is widely used across the industry. This guide walks you through installing and updating MySQL Community on Windows, macOS, and Linux (either through the native repositories or MySQL’s own repositories).

      When installing MySQL, you can either install MySQL Server or MySQL client utilities. Installing the entire MySQL Server software is the most common option. This allows you to run a full database server on your system. It also installs all of the client utilities that you might need when working with any MySQL instances (a locally installed one or one on a remote system). If you want to reduce disk usage or know you only need the client utilities, you can install the MySQL client package. Alternatively, consider installing and using the
      MySQL Shell.

      Currently, there are two primary MySQL releases to consider: MySQL 5.7 and MySQL 8.0. Both are still receiving support and updates (until October 2023 and April 2026 respectively). You should likely install MySQL 8.0 unless your application does not yet support it.

      Note

      For additional instructions on installing MySQL on any supported operating system, see the
      Installing and Upgrading MySQL guide in the official documentation.

      Before You Begin

      • Consider other deployment options, such as fully managed solutions or automated installations.

      • Check to see if MySQL is already installed on your system. To determine if MySQL is already installed, run the following command:

        mysql --version
        

        The above command should inform you which version you are using. If this command is not found, continue with the installation steps below. If the installed version differs from the release you want to use, consider first uninstalling it and then continuing with the instructions below.

      Note

      The steps in this guide are written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, see the
      Linux Users and Groups guide.

      Installing MySQL on Windows

      1. Open a web browser and navigate to the
        MySQL Installer Downloads page. By default, the latest version of MySQL is displayed. You can also view the installer files for
        8.0 or
        5.7 directly. Alternatively, you can navigate to the Archives tab and select any MySQL release and version you wish.

      2. Select your operating system version, click the Download link corresponding with the package you’d like to install, and then click the No thanks, just start my download link. The file should now start downloading.

      3. Open the downloaded file and follow the prompts to install MySQL on your system.

      Installing MySQL on macOS

      1. Open a web browser and navigate to the
        MySQL Community Server Downloads page. By default, the latest version of MySQL is displayed. You can also view the installer files for
        8.0 or
        5.7 directly. Alternatively, you can navigate to the Archives tab and select any MySQL release and version you wish.

      2. Select your operating system version, click the Download link corresponding with the package you’d like to install, and then click the No thanks, just start my download link. The file should now start downloading.

      3. Open the downloaded file and follow the prompts to install MySQL on your system.

      Installing MySQL on Linux: Native Repositories

      One of the fastest ways to quickly install MySQL on most common Linux distributions is to use the distribution’s default/native repositories. For greater control over the release and version that’s installed, and to get the latest versions faster, you may want to consider using
      MySQL’s own YUM or APT repositories.

      CentOS Stream 8 (and 9), CentOS/RHEL 8 (and 9)

      sudo dnf upgrade && sudo dnf install mysql-server
      

      CentOS/RHEL 7

      MySQL is not available through CentOS 7’s native repositories (see
      CentOS 7 Packages list). Installing the mysql package actually installs the mariadb package. While MariaDB can be used as a drop-in replacement in some cases, it may be preferable to install MySQL through the
      MySQL YUM repository.

      sudo yum update && sudo yum install mariadb-server
      

      Debian

      MySQL is not available through Debian’s native repositories. Instead, Debian includes MariaDB. While MariaDB can be used as a drop-in replacement in some cases, it may be preferable to install MySQL through the
      MySQL APT repository.

      sudo apt update && sudo apt install mariadb-server
      

      Fedora

      sudo dnf update && sudo dnf install mysql-community-server
      

      Ubuntu

      sudo apt update && sudo apt install mysql-server
      

      Replace mysql-server with one of the available packages below. If no version is specified in the package name, the default version is installed.

      • MySQL Server packages: mysql-server

        Target a specific version with mysql-server-5.7 or mysql-server-8.0. See
        Ubuntu Package Search for more.

      • MySQL Client packages: mysql-client

        Target a specific version with mysql-client-5.7 or mysql-client-8.0. See
        Ubuntu Package Search for more.

      Installing MySQL on Linux: MySQL’s Repositories

      Using MySQL’s own repositories provides the latest MySQL versions faster than most native repositories. It also allows you more control over the version that is installed.

      Ubuntu and Debian (APT Repository)

      1. Download the release package for your distribution. Currently, all compatible distributions are combined into a single release package.

        wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
        

        If you’d like to download the latest version of this file or to select a different distribution, visit the
        MySQL APT Repository Downloads page. To obtain the URL for the file, click the Downloads button next to the package you wish to download, right click on the No thanks, just start my download link, and select Copy Link Address (or similar).

      2. Install the downloaded release package. If you downloaded a different file than featured in the previous step, adjust the filename as needed.

        sudo dpkg -i ./mysql-apt-config_0.8.22-1_all.deb
        
      3. The repository configuration tool should automatically start. If not, you can run it using the following command:

        sudo dpkg-reconfigure mysql-apt-config
        
      4. Within the configuration tool, you can select from the options below to adjust how the repository is configured in your system:

        • MySQL Server & Cluster: Select mysql to add MySQL Server packages, mysql-cluster to add the
          MySQL NDB Cluster, or None to forgo adding either option.

        • MySQL Tools & Connectors: When enabled, this option adds all of the additional tools and utilities included with the MySQL software.

        • MySQL Preview Packages: Leave this option as disabled in production, though non-production environments can enable this to test unreleased features and products.

      5. Run the update command to obtain updated package version and dependency information:

        sudo apt update
        
      6. Install MySQL Server or just the MySQL client tools:

        Additional information about the packages available within MySQL’s APT repository can be found by exploring the repository for your distribution:
        Ubuntu or
        Debian.

      CentOS/RHEL and Fedora (YUM Repository)

      1. Download the release package for your distribution.

        curl -OL [file-url]
        
        • CentOS/RHEL 8: https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm
        • CentOS/RHEL 7: https://dev.mysql.com/get/mysql80-community-release-el7-6.noarch.rpm
        • Fedora 35: https://dev.mysql.com/get/mysql80-community-release-fc35-3.noarch.rpm
        • Fedora 34: https://dev.mysql.com/get/mysql80-community-release-fc34-4.noarch.rpm

        If you’d like to download the latest file or to select a different distribution, visit the
        MySQL YUM Repository Downloads page. To obtain the URL for the desired file, click the Downloads button next to the package you wish to download, right click on the No thanks, just start my download link, and select Copy Link Address (or similar).

      2. Install the downloaded release package, replacing [filename] with the file you just downloaded.

        sudo yum install [filename]
        

        Once installed, you can view all available packages and all enabled packages by running the commands below:

        yum repolist all | grep mysql
        yum repolist enabled | grep mysql
        
      3. By default, the MySQL 8.0 release will be installed. To switch this to MySQL 5.7 or any other available release, run the following commands:

        • CentOS Stream 8 (and 9), CentOS/RHEL 8 (and 9)

          sudo dnf config-manager --disable mysql80-community
          sudo dnf config-manager --enable mysql57-community
          
        • CentOS/RHEL 7:

          sudo yum-config-manager --disable mysql80-community
          sudo yum-config-manager --enable mysql57-community
          
      4. Within CentOS/RHEL 8 distributions, disable the default MySQL module.

        sudo dnf module disable mysql
        
      5. Install MySQL Server or just the MySQL client tools:

        Additional information about the packages available within MySQL’s YUM repository can be found by
        exploring the repository.

      More Information

      You may wish to consult the following resources for additional information
      on this topic. While these are provided in the hope that they will be
      useful, please note that we cannot vouch for the accuracy or timeliness of
      externally hosted materials.



      Source link

      A Guide to API Formats: The Different Types of APIs


      APIs are what keep software connected. Whether you are looking to link your application to others or you want to have smooth communication between services, APIs help bring multiple pieces of an application together.

      Applications and services can be connected in myriad ways, depending on access limitations and communication protocols. APIs have developed several different approaches for making connections to support modern application architectures.

      In this tutorial, learn about what APIs are, the types of APIs that are available, and the various protocols they can use to communicate.

      What is an API?

      An API — short for Application Programming Interface — defines a set of rules by which applications and services can interact.

      APIs are used in a wide variety of contexts. However, often, when people talk about APIs, they are talking about web APIs. These APIs allow for communication between applications and services using the
      HTTP protocol
      .

      Often, web APIs are used for web application servers and web browsers to communicate. However, you may also see web APIs used for communication between different web servers, or between applications on the same server. You may even see web APIs at work between different services acting as parts of the same application. One example of an API enabling communication between different services of the same application, is Kubernetes. The
      Kubernetes API
      is the linchpin to its powerful orchestration system.

      The Four Main Types of APIs

      APIs come in four different modalities. Each of these covers a different access level or, in the case of web APIs, a different usage.

      Which one of these you use depends on your API’s particular needs. The sections below provide descriptions of each kind of API and they can help you decide which is best for your use case. Each section also provides context and examples to make it easier to see how each API model can fit into different use cases.

      Open APIs

      Open APIs, or public APIs, come with limited or no access restrictions. This essentially allows any developer to make requests to these APIs.

      These APIs may have some limits. A developer may have to register an account to receive an API key, for instance. Additionally, limits may be placed on things like the number of requests in a given time frame.

      But overall, open APIs are distinguished by being intended for widespread external use. They are meant for third-party developers to be able to access and make use of the API as they need.

      An example of open APIs are those provided by
      NASA
      . After completing a simple registration for an API key, NASA gives you access to numerous open APIs. NASA’s open APIs include everything from Earth observation images to information about the weather on Mars.

      When to Use an Open API?

      Make your API open when you intend it for public consumption. Open APIs are especially useful when you have information or services you want to make available to the general public.

      These APIs are often used for open source projects and for the dissemination of public knowledge, like NASA and other government agencies.

      Partner APIs

      Partner APIs require authorization of some kind to use. They still allow external access, but are not intended for the general public to have access to. Instead, partner APIs are designed for use by pre-approved individuals, teams, or organizations.

      A partner API may allow public access through a paid subscription or it may limit access to developers with a business relationship. Typically, the developer has an API key, as with open APIs, that require registration. But with partner APIs, keys tend to be given out more sparingly and with more access restrictions.

      An example of a partner API is one that allows two companies to work together. Company A may have an application which Company B has agreed to provide services for. Developers at Company A receive API keys which they can use to access Company B’s API. This allows Company A’s application to make use of Company B’s services while keeping access to these services limited.

      When to Use a Partner API?

      Make your API a partner API when it needs to be accessed externally but that access needs to be limited to authorized users. Partner APIs are ideal for business-to-business services or for subscription-based APIs.

      You are likely to see partner APIs in companies that make use of external services for parts of an application’s functionality. Often, this can be a preferred solution compared to developing services in house. It allows companies to integrate features that have been developed by experts elsewhere into their applications. At the same time, it lets the external experts retain control of their services.

      Internal APIs

      Internal APIs, also called private APIs, disallow external access. Instead, these APIs can only be accessed by developers within a company or even within the particular application to which the API belongs.

      These APIs are the most limited. APIs are incredibly useful in defining communication between applications and services, and this even applies when communication is within a single organization.

      A simple example of an internal API use case is a company that has two applications for selling items. One application allows customers to purchase items directly; the other allows sales personnel to process sales. Both applications need access to the inventory. The company could have both applications independently access the inventory database. However, doing so would likely lead to more difficult and inconsistent maintenance.

      So, instead, the company has an internal API for managing inventory. Both the customer-facing and sales-personnel applications can access this API to view and update inventory. Updates to each application can be made independently, as long as each adheres to the rules of the API.

      When to Use an Internal API?

      Make your API internal when you want to restrict access as much as possible. Internal APIs are designed to be private, with only applications and services within your organization having access. An internal API can even be used when different parts of an application need to communicate.

      These APIs are common within enterprise organizations. When applications scale, it helps to define APIs for managing underlying logic. Take the example above, where business logic can be developed and maintained in the customer-facing and sales-personnel applications. This can be done without concern for the impact to the underlying data storage and retrieval tasks, since those are housed in the internal API.

      Composite APIs

      Composite APIs allow for requests to be bundled or chained together, which, in turn, allows developers to receive single responses for request collections.

      These APIs are useful for reducing server load and network traffic when you expect frequent requests to multiple API endpoints. Calls get made less frequently, resulting in reductions to server processing time and the number of requests across the network.

      This makes composite APIs exceptionally effective for microservices. Often, applications built on microservices have to compile information from multiple sources. Having composite APIs that do this makes for more efficient applications.

      To give an example of a composite API in action, think of an online ordering form. When the user completes and submits the form, the application often has to register the user, check and update inventory, and send a confirmation notification. A composite API allows all of these tasks to be handled simultaneously, in a single call.

      When to Use a Composite API?

      Make use of a composite API when your application exposes endpoints that are likely to be called in groups or in quick succession. This is often the case with microservices, where requests and responses frequently need to be combined.

      This type of API can be especially useful when your
      microservice application
      needs to communicate with users’ web browsers. Here, you want to optimize network traffic to reduce load times and improve user experience. You also want to reduce your server load to make your application scalable for a larger number of users.

      What are the Different API Protocol Types?

      Every API uses a particular protocol. An API’s protocol defines the rules for how it can communicate. These rules make explicit the kinds of requests that can be made, what the API’s responses look like, and what kinds of data the API can send and receive.

      There are three main protocols used by web APIs.

      • REST. Short for Representational State Transfer, REST implements stateless APIs with uniform interfaces using HTTP. REST is actually more of a set of architectural principles for APIs than a protocol proper. You can use the
        Flask Python framework
        to build your own REST API.

      • SOAP. The Simple Object Access Protocol uses XML for requests and responses and maintains strict definitions for messages. SOAP is highly adaptable, designed to be neutral, and applicable in many contexts, not just for web APIs. It can even be used in conjunction with REST principles.

      • RPC. Simpler than both REST and SOAP, the Remote Procedural Call protocol focuses on actions taken on a server. This is in contrast to both REST and SOAP, which tend to focus on server resources. RPC works primarily on running processes. Often, RPC APIs execute scripts on the server.

      Conclusion

      This guide has walked you through the basics of APIs, explaining the different categories they fit into and the contexts they are used in. The four main types of APIs are open, partner, internal, and composite. The guide also covered the protocols web APIs use to send and receive messages. These API protocols are REST, SOAP, and RPC. You now have a strong foundation for entering into the world of web APIs. It is a wide and fast-moving world.



      Source link