How to optimize your website for search engines

Long-term domain name

Add share buttons to your website

Add the nosniff header

X-Content-Type-Options: nosniff

Use Google Analytics

Provide a robots.txt file

Provide an XML sitemap

Style your XML sitemap

Verify your XML sitemap

Disable the server signature

Microsoft-IIS/10.0
Apache/2.2.3 (CentOS) Server at 115.113.103.35 Port 80
ServerSignature Off
ServerTokens Prod
Apache/2

Disable directory listing

HTTP/2.0 Support

Implement /.well-known/change-password

Change password for a website through the Edge password manager
Change password for a website through the Chrome password manager

HTTPS

  • Generating the public-private key pair
  • Setting up the challenges on your webserver in order for Boulder to perform the challenges, and verify that you are actually the owner of the webserver and the domain name
  • With ACME V2, you still need to add a DNS TXT record to prove ownership of the domain name
  • Signing the certificate with the private key of the R3 intermediate
  • Changing your webserver configuration to use the new certificate

HTTPS redirection

app.UseHttpsRedirection();

HSTS

app.UseHsts();

HSTS Preload List

Specify Content-Language

  • Content-Language header. Simply add a response header Content-Language: en-US
  • <meta> tag: <meta http-quiv="Content-Language" content="en">

Use GZIP

Add canonical url

dns-prefetch

Keep the connection alive

̶C̶o̶n̶n̶e̶c̶t̶i̶o̶n̶:̶ ̶K̶e̶e̶p̶-̶A̶l̶i̶v̶e̶

Use hreflang tags

noscript

Think about blind people

Create a responsive website

media queries

noopener / noreferrer

window.open('https://example.com','_blank','noopener');

Use a favicon

<link rel="icon" type="image/svg+xml" href="https://example.com/favicons/favicon.svg">

Add titles to your links

Add alt to your images

Viewport tag

Implement dark theme

Meta-tags

Apple Touch Icon

MSApplication

LD+JSON

OpenGraph tags

TwitterCard

Backlinks

Integrity hashes

<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"></script>
ng build --subresource-integrity

PWA / Service-worker

  • javascript files
  • stylesheets
  • assets
  • You can configure for http-calls to be cached too
ng add @angular/pwa

Provide AMP pages

<link rel="amphtml" href="https://example.com/amp/song/134">
<link rel="canonical" href="https://example.com/song/134/body-like-a-back-road">

Cache-control

ETag

Use meaningful urls

https://example.com/song/134
https://example.com/song/134/body-like-a-back-road

Use server-side rendering

Route-level code-splitting

  • Per page, you only import the dependant modules you actually need on that page
  • The browser only needs to download some small javascript files, containing only the components it actually needs
ng g module pages --module app --route /
cd pages
ng g module account --module pages --route account
cd account
ng g module login --module account --route login
ng g module register --module account --route register
ng g module profile --module account --route profile

Minify code

Use image sprites

.icon.icon-heart {
width: 16px;
height: 16px;
background: url('sprite.png');
background-position: 32px 48px;
}

Prevent FOIT

@font-face {
font-display: swap;
}

Add a Privacy Policy / Terms of Service

Add a Blog / Forum

Use Lighthouse

Add sitelinks searchbox

--

--

--

.NET + Angular Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Queues — Dev Log #6

Vi the Unix text editor

Analysing and Visualising Tweets

How I Built My Own Open Source Project

Euler Project — Bouncy Numbers

How to setup your own FREE VPN server on cloud (AWS)

Unity is strength, the community is the basis of the success for every project

Continuous Data Ingestion from Azure Blob Storage to Snowflake using Snowpipe

Azure Portal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pieterjan De Clippel

Pieterjan De Clippel

.NET + Angular Developer

More from Medium

What is The Best Frontend Option for .Net Backend?

Unable to find an OpenAPI description error in .net 6 REPL CLI tool

Microsoft .NET 6 -What’s All About The New Update

Opening a File in the Browser from WSL