Creating SEO and Socially Optimized No Code Dynamic Pages With Webflow, Wized, Cloudflare and Prerender
Moon Now is a Product Growth and Recruiting Agency that builds your MVP and hires your teams.
Step-by-Step Guide
SEO and socially optimized pages using Webflow, Wized, CloudFlare, and Prerender. These steps will help you ensure your dynamic content is accessible to search engines and social media platforms, ultimately improving your website's visibility and reach. Before we begin, make sure you have the following prerequisites in place:
Prerequisites
- Compelling Content: Ensure your content is shareable and provides value to your audience. If people have a reason to share your content, it will be worth optimizing it.
- Public Access: Ensure your pages do not require authentication or login to view the content. Bots from search engines and social media platforms need access to crawl and index your pages.
- Custom Domain: Purchase and set up a custom domain on Webflow and Wized. This step is essential for the process to work effectively.
- Wized Integration: Use Wized to serve content within your Webflow website dynamically. Ensure that your website design in Webflow matches the desired output.
Step 1: Setting up SEO and Social Tags in Webflow
- Access Webflow and navigate to the page you want to optimize.
- Within the "Head" tag, add the necessary properties for search engines and social media platforms to recognize and display your content. The code to copy and paste is at the end of this article.
- Include properties such as canonical URL, language declaration, index instructions, meta tags for description and keywords, author name, and OpenGraph (OG) tags for title, description, and image.
- Modify the code to dynamically set the content using the data from Wized. Use the JavaScript console to identify the data values you want to populate dynamically.
- Test the implementation by inspecting the page elements and verifying that thamicallye dynamic content is correctly populated.
Step 2: Updating DNS Management with CloudFlare
- Set up a CloudFlare account and access the CloudFlare dashboard.
- Go to the DNS management section of your domain registrar (e.g., GoDaddy) and update the name servers to point to CloudFlare.
- Wait for the DNS changes to propagate, which may take some time.
- Once the changes are in effect, update the DNS values within CloudFlare, including the SSL settings.
- Ensure the CloudFlare proxy is enabled for your domain.
Step 3: Configuring Prerender with CloudFlare
- Access the Prerender dashboard and locate your Prerender token.
- In CloudFlare, navigate to the Workers section and create a new worker.
- Copy the code provided in the Prerender GitHub repository and paste it into the CloudFlare worker code editor.
- Replace the placeholder API key in the code with your Prerender token.
- Save and deploy the CloudFlare worker.
- Add your custom domain to the CloudFlare worker and configure the routes for pages you want to be prerendered.
- Sync the CloudFlare settings with Prerender to establish the connection.
- Specify the URL parameters that should be used for caching, such as profile URLs, in the Prerender cache manager.
Copy and Paste this Code into Webflow Head Tag and Update the Variable Placeholders For Your Own Site
<link rel="canonical" href="INSERT YOUR BASE URL HERE">
<html lang="en_us">
<meta name="robots" content="index, follow"/>
<title id="page-title"></title>
<meta name="description" content="INSERT YOUR BASE DESCRIPTION"/>
<meta name="keywords" content="INSERT YOUR COMMA SEPERATED KEYWORDS HERE"/>
<meta name="author" content="INSERT YOUR AUTHOR NAME"/>
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="INSERT YOUR SITE NAME">
<meta property="twitter:creator" content="INSERT CREATOR NAME">
<meta property="twitter:title" content="INSERT YOUR PAGE TITLE">
<meta property="twitter:description" content="INSERT YOUR PAGE DESCRIPTION">
<meta property="twitter:image" content="INSERT YOUR IMAGE URL FOR THE PAGE">
<meta property='og:title' content="INSERT YOUR TITLE"/>
<meta property='og:image' content="INSERT YOUR IMAGE URL FOR THE PAGE"/>
<meta property="og:description" content="INSERT YOUR DESCRIPTION">
<meta property='og:url' content="INSERT PAGE URL" />
<meta property='og:author' content="INSERT AUTHROR NAME" />
<meta property="og:site_name" content="INSERT SITE NAME"/>
<script>
window.onload = async () => {
try {
const response = await Wized.request.execute("INSERT YOUR DATA IN WIZED RESPONSE NAME HERE");
console.log(response);
// OpenGraph Metadata Assignment
var OGTitle = document.querySelector('meta[property="og:title"]');
OGTitle.setAttribute('content', `${response.data.YOURDATAHERE}'s Shows`);
var OGAuthor=document.querySelector('meta[property="og:author"]');
OGAuthor.setAttribute('content',response.data.YOURDATAHERE);
var OGDesc = document.querySelector('meta[property="og:description"]');
OGDesc.setAttribute('content', response.data.YOURDATAHERE);
var OGImg = document.querySelector('meta[property="og:image"]');
OGImg.setAttribute('content', response.data.YOURDATAHERE);
var OGURL = document.querySelector('meta[property="og:url"]');
OGURL.setAttribute('content', `https://www.shownlive.tv/my-shows?profile=${response.data.YOURDATAHERE}`);
// Twitter Card Values
var twitterTitle = document.querySelector('meta[property="twitter:title"]');
twitterTitle.setAttribute('content', `${response.data.YOURDATAHERE}'s Shows`);
var twitterCreator =document.querySelector('meta[property="twitter:creator"]');
twitterCreator.setAttribute('content',`@${response.data.YOURDATAHERE}`);
var twitterDesc = document.querySelector('meta[property="twitter:description"]');
twitterDesc.setAttribute('content', response.data.YOURDATAHERE);
var twitterImg = document.querySelector('meta[property="twitter:image"]');
twitterImg.setAttribute('content', response.data.YOURDATAHERE);
// General Metadata Assignment
var canURL = document.querySelector('link[rel="canonical"]');
canURL.setAttribute('content', `https://www.shownlive.tv/my-shows?profile=${response.data.YOURDATAHERE}`);
var pageTitle = document.getElementById('page-title');
pageTitle.textContent = ('content', `${response.data.YOURDATAHERE}'s Shows`);
var pageDesc = document.querySelector('meta[name="description"]');
pageDesc.setAttribute('content', response.data.YOURDATAHERE);
var pageAuthor=document.querySelector('meta[property="author"]');
pageAuthor.setAttribute('content',response.data.YOURDATAHERE;
} catch (error) {
console.error(error);
}
}
</script>