Chatgpt sadece bir yol ve müdahale platformundan daha fazlasıdır. SEO ile yardım istemek için istemler gönderebilirsiniz, ancak kendi temsilcinizi yaptığınız anda daha güçlü hale gelir.
Birçok SEO denetim yapıyorum – bu bir işletme sitesi için bir zorunluluktur – bu yüzden bu süreçlerin bazılarını kolaylaştırmanın bir yolunu arıyordum.
Nasıl yaptım? İhtiyaçlarınızı karşılamak için özelleştirebilmeniz ve değiştirebilmeniz için sizinle paylaşacağım bir ChatGPT aracısı oluşturarak.
İşleri olabildiğince “açık” tutacağım, ancak sadece talimatları takip edeceğim ve her şey işe yaramalı.
Aşağıdaki adımları açıklayacağım “
- Kendi chatgptinizin yapılandırması.
- Bir sayfanın HTML verilerini almak için kendi Cloudflare kodunuzu oluşturma.
- SEO denetim aracılarınızı işe koyun.
Sonunda, size bilgi sağlayan bir botunuz olacak:
Ayrıca, temsilcinin bulgularına göre SEO'nuzu geliştirmek için atılabileceğiniz eyleme geçirilebilir adımların bir listesini de alacaksınız.
Temsilciniz için bir Cloudflare sayfası çalışanı oluşturma
Cloudflare sayfaları çalışanlar, temsilcinizin mevcut SEO durumunu ayrıştırmaya ve görüntülemeye çalıştığınız web sitesinden bilgi toplamasına yardımcı olur.
Başlamak için ücretsiz bir hesap kullanabilirsiniz ve aşağıdakileri yaparak kaydolabilirsiniz:
- Http://pages.dev/ adresine gidiyorum
- Bir Hesap Oluşturma
Kaydolmak için Google'ı kullandım çünkü daha kolay, ancak en rahat olduğunuz yöntemi seçin. Sonunda şuna benzeyen bir ekranda olacaksınız:
Gezmek Ekle> İşçiler.
Daha sonra bir şablon seçebilir, bir depoyu içe aktarabilir veya Hello World ile başlayabilirsiniz! Hello World seçeneğini seçtim, çünkü kullanılması en kolay olanı.
Bir sonraki ekrandan geçin ve vurun “Dağıtmak. ” Sonunda “Başarı! Projeniz bölgeye konuşlandırıldı: Dünya. ”
Bu sayfayı tıklamayın.
Bunun yerine, “Kodu Düzenle”Mevcut tüm kodu kaldırın ve aşağıdaki kodu düzenleyiciye girin:
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
});
async function handleRequest(request) {
const { searchParams } = new URL(request.url);
const targetUrl = searchParams.get('url');
const userAgentName = searchParams.get('user-agent');
if (!targetUrl) {
return new Response(
JSON.stringify({ error: "Missing 'url' parameter" }),
{ status: 400, headers: { 'Content-Type': 'application/json' } }
);
}
const userAgents = {
googlebot: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.6167.184 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
samsung5g: 'Mozilla/5.0 (Linux; Android 13; SM-S901B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36',
iphone13pmax: 'Mozilla/5.0 (iPhone14,3; U; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/19A346 Safari/602.1',
msedge: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246',
safari: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9',
bingbot: 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/',
chrome: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
};
const userAgent = userAgents[userAgentName] || userAgents.chrome;
const headers = {
'User-Agent': userAgent,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': 'gzip',
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
};
try {
let redirectChain = [];
let currentUrl = targetUrl;
let finalResponse;
// Follow redirects
while (true) {
const response = await fetch(currentUrl, { headers, redirect: 'manual' });
// Add the current URL and status to the redirect chain only if it's not already added
if (!redirectChain.length || redirectChain[redirectChain.length - 1].url !== currentUrl) {
redirectChain.push({ url: currentUrl, status: response.status });
}
// Check if the response is a redirect
if (response.status >= 300 && response.status < 400 && response.headers.get('location')) {
const redirectUrl = new URL(response.headers.get('location'), currentUrl).href;
currentUrl = redirectUrl; // Follow the redirect
} else {
// No more redirects; capture the final response
finalResponse = response;
break;
}
}
if (!finalResponse.ok) {
throw new Error(`Request to ${targetUrl} failed with status code: ${finalResponse.status}`);
}
const html = await finalResponse.text();
// Robots.txt
const domain = new URL(targetUrl).origin;
const robotsTxtResponse = await fetch(`${domain}/robots.txt`, { headers });
const robotsTxt = robotsTxtResponse.ok ? await robotsTxtResponse.text() : 'robots.txt not found';
const sitemapMatches = robotsTxt.match(/Sitemap:s*(https?://[^s]+)/gi) || [];
const sitemaps = sitemapMatches.map(sitemap => sitemap.replace('Sitemap: ', '').trim());
// Metadata
const titleMatch = html.match(/<title[^>]*>s*(.*?)s*</title>/i);
const title = titleMatch ? titleMatch[1] : 'No Title Found';
const metaDescriptionMatch = html.match(/<metas+name=["']description["']s+content=["'](.*?)["']s*/?>/i);
const metaDescription = metaDescriptionMatch ? metaDescriptionMatch[1] : 'No Meta Description Found';
const canonicalMatch = html.match(/<links+rel=['"]canonical['"]s+href=['"](.*?)['"]s*/?>/i);
const canonical = canonicalMatch ? canonicalMatch[1] : 'No Canonical Tag Found';
// Open Graph and Twitter Info
const ogTags = {
ogTitle: (html.match(/<metas+property="og:title"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[1] || 'No Open Graph Title',
ogDescription: (html.match(/<metas+property="og:description"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[1] || 'No Open Graph Description',
ogImage: (html.match(/<metas+property="og:image"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[1] || 'No Open Graph Image',
};
const twitterTags = {
twitterTitle: (html.match(/<metas+(name|property)="twitter:title"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Title',
twitterDescription: (html.match(/<metas+(name|property)="twitter:description"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Description',
twitterImage: (html.match(/<metas+(name|property)="twitter:image"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Image',
twitterCard: (html.match(/<metas+(name|property)="twitter:card"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Card Type',
twitterCreator: (html.match(/<metas+(name|property)="twitter:creator"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Creator',
twitterSite: (html.match(/<metas+(name|property)="twitter:site"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Site',
twitterLabel1: (html.match(/<metas+(name|property)="twitter:label1"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Label 1',
twitterData1: (html.match(/<metas+(name|property)="twitter:data1"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Data 1',
twitterLabel2: (html.match(/<metas+(name|property)="twitter:label2"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Label 2',
twitterData2: (html.match(/<metas+(name|property)="twitter:data2"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Data 2',
twitterAccountId: (html.match(/<metas+(name|property)="twitter:account_id"s+content="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"s*/?>/i) || [])[2] || 'No Twitter Account ID',
};
// Headings
const headings = {
h1: [...html.matchAll(/<h1[^>]*>(.*?)</h1>/gis)].map(match => match[1]),
h2: [...html.matchAll(/<h2[^>]*>(.*?)</h2>/gis)].map(match => match[1]),
h3: [...html.matchAll(/<h3[^>]*>(.*?)</h3>/gis)].map(match => match[1]),
};
// Images
const imageMatches = [...html.matchAll(/<imgs+[^>]*src="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"[^>]*>/gi)];
const images = imageMatches.map(img => img[1]);
const imagesWithoutAlt = imageMatches.filter(img => !/alt=".*?"/i.test(img[0])).length;
// Links
const linkMatches = [...html.matchAll(/<as+[^>]*href="https://www.searchenginejournal.com/create-your-own-chatgpt-agent-for-on-page-seo-audits/546016/(.*?)"[^>]*>/gi)];
const links = {
internal: linkMatches.filter(link => link[1].startsWith(domain)).map(link => link[1]),
external: linkMatches.filter(link => !link[1].startsWith(domain) && link[1].startsWith('http')).map(link => link[1]),
};
// Schemas (JSON-LD)
const schemaJSONLDMatches = [...html.matchAll(/<script[^>]*type="application/ld+json"[^>]*>(.*?)</script>/gis)];
const schemas = schemaJSONLDMatches.map(match => {
try {
return JSON.parse(match[1].trim());
} catch {
return { error: "Invalid JSON-LD", raw: match[1].trim() };
}
});
// Microdata
const microdataMatches = [...html.matchAll(/<[^>]*itemscope[^>]*>/gi)];
const microdata = microdataMatches.map(scope => {
const typeMatch = scope[0].match(/itemtype=["'](.*?)["']/i);
return {
type: typeMatch ? typeMatch[1] : 'Unknown',
raw: scope[0],
};
});
// Response Headers
const responseHeaders = Array.from(finalResponse.headers.entries());
// Construct final JSON output
return new Response(
JSON.stringify({
targetUrl,
redirectChain,
sitemaps,
metadata: { title, metaDescription, canonical },
headings,
schemas,
openGraph: ogTags,
twitterCards: twitterTags,
images: { total: images.length, withoutAlt: imagesWithoutAlt, imageURLs: images },
links,
microdata,
robotsTxt,
responseHeaders,
//rawHTML: html,
}),
{ headers: { 'Content-Type': 'application/json' } }
);
} catch (error) {
return new Response(
JSON.stringify({ error: error.message }),
{ status: 500, headers: { 'Content-Type': 'application/json' } }
);
}
}
Bu noktada yapacak iki şeyin var:
- URL'yi çalışanınıza kopyalayın.
- İşçinizi dağıtın.
Bu, bir sonraki bölümde ihtiyaç duyacağınız URL'dir. Burada bulabilirsiniz:
Vurduğunuzdan emin olunDağıtmak“Ekrandan çıkmadan önce. Bu aşamada temel çıktıyı görmek istiyorsanız, yapabilirsiniz.
URL'nizi tarayıcınıza yapıştırın ve /?url=https://www.searseenginejournal.com'dan sonra aşağıdakileri ekleyin.
URL'niz şuna benzeyecek: https://yoururl.workers.dev/?url=https://searseenginejournal.com.
URL'yi bunu test etmeyi seçtiğinizden birine değiştirin. Bu aşamada “en güzel” değil, bu yüzden şimdi kendi GPT'nizi yapılandırmanın eğlenceli kısmına geçmenin zamanı geldi.
Not: Bu işçi JavaScript tarafından oluşturulan sitelerle çalışmıyor. Ancak bu ajanı kullanan herkes için iyi çalışmalıdır. JavaScript oluşturma ile çalışmak için geliştirmekten çekinmeyin.
Ajanımı taklit etmek için kendi GPT'nizi yapılandırmak
Önce GPT'nizi yapılandırmanız gerekir ve bunu chatgpt açarak ve:GPT'leri keşfedin”Ya da bu bağlantıyı takip edebilirsiniz.
Sonra gideceksin “+ Oluştur“:
Şimdi, “oluştur” ve “yapılandır” diyecektir. Gidip gelmek Yapılandırmak ve bilgilerinizi takmaya başlayın.
İşleri biraz değiştirmekten çekinmeyin, ancak denetçinizin temelini oluşturmak için aşağıda eklediğim her şeyi takip etmenizi öneririm.
Bu bölümde listeleyeceğimi ekleyeceksiniz:
Name: OnPage SEO Audit
Description: Analyze SEO performance of any webpage using custom user-agents. Get detailed insights into metadata, redirect chains, Open Graph tags, Twitter Cards, sitemaps, and more. Perfect for SEO professionals and developers.
Instructions:
Trigger: When a user submits a URL (required) and an optional user-agent:
Instruction: Use the provided inputs to make an API request to retrieve SEO data. Default to the chrome user-agent if not provided.
Trigger: When the API returns valid data:
Instruction: Analyze the data and provide:
A summary of the page's SEO performance.
Actionable suggestions for improvement, categorized into metadata, technical SEO, and content.
Follow-up questions to clarify user priorities or goals, such as:
"Do you have specific goals for this page, such as improving search visibility, click-through rates, or user engagement?"
"Would you like me to focus on technical SEO or content-related improvements first?"
Example Response:
"The page's meta description is missing, which can impact click-through rates. Would you like me to suggest a draft description?"
Trigger: When the API returns HTTP 403:
Instruction:
Retry the request using the chrome user-agent.
If the issue persists:
Notify the user of the problem.
Suggest verifying the URL or user-agent compatibility.
Trigger: When the API returns a 400 error:
Instruction:
Clearly explain the error and provide actionable steps to resolve it (e.g., verify the URL format or ensure required parameters are provided).
Trigger: When data is incomplete or missing:
Instruction:
Request additional information from the user or permission to explore fallback data sources.
Example Follow-Up:
"The API response is missing a meta description for this page. Can you confirm if this was intentional, or should we explore other sources?"
Additional Guidelines:
Include:
A categorized summary of the page's SEO performance (e.g., metadata, technical SEO, content).
A prioritized list of recommended actions.
Visual examples or detailed explanations, when applicable.
Proactively address multiple detected issues with follow-up questions:
"The page has several critical issues, including missing Open Graph tags and a non-canonical URL. Would you like me to prioritize recommendations for social media or canonicalization first?"
Conversation starters
User-Agent: Googlebot, URL: https://example.com
Analyze the SEO details for https://example.com using Googlebot.
Analyze the page using the Samsung Galaxy S22 user-agent.
What metadata is available for https://example.com with Chrome?
Capabilities
Web Search
Code Interpreter & Data Analysis
Bu noktada yapılandırmanız şuna benzemelidir:
Tüm bu alanları inceleyin ve devam etmeden önce her birini düzgün bir şekilde doldurup doldurmadığınızı görün Yeni Eylem Oluşturun.
Gezmek Kimlik doğrulama ve seç Hiçbiri.
Şema alanına aşağıdaki chatgpt eylem kodlamasını ekleyin, ancak Sunucular> URL kendi url'nize alan. Bulmanız kolay olacak şekilde “https://changetoyoururl.com/” adını vereceğim.
{
"openapi": "3.1.0",
"info": {
"title": "Enhanced SEO Analysis and Audit API",
"description": "Fetch SEO data for analysis. Use the returned data to generate actionable SEO recommendations using AI or experts.",
"version": "1.2.0"
},
"servers": [
{
"url": "https://CHANGETOYOURURL.com/",
"description": "Base URL for Enhanced SEO Analysis API"
}
],
"paths": {
"/": {
"get": {
"operationId": "fetchAndAuditSEOData",
"summary": "Fetch and Audit SEO Data",
"description": "Retrieve SEO analysis data using a user-agent and URL and perform a basic SEO audit.",
"parameters": [
{
"name": "user-agent",
"in": "query",
"description": "The user-agent for the request.",
"required": true,
"schema": {
"type": "string",
"enum": ["chrome", "googlebot", "iphone13pmax", "samsung5g"]
}
},
{
"name": "url",
"in": "query",
"description": "The URL of the webpage to analyze.",
"required": true,
"schema": {
"type": "string",
"format": "uri"
}
}
],
"responses": {
"200": {
"description": "Successful response with audit results",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"title": { "type": "string" },
"metaDescription": { "type": "string" },
"canonical": { "type": "string" }
}
},
"redirectChain": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": { "type": "string" },
"status": { "type": "integer" }
}
}
},
"openGraph": {
"type": "object",
"properties": {
"ogTitle": { "type": "string" },
"ogDescription": { "type": "string" },
"ogImage": { "type": "string" }
}
},
"twitterCards": {
"type": "object",
"properties": {
"twitterTitle": { "type": "string" },
"twitterDescription": { "type": "string" },
"twitterImage": { "type": "string" }
}
},
"sitemaps": {
"type": "array",
"items": { "type": "string" }
},
"robotsTxt": {
"type": "string"
},
"audit": {
"type": "object",
"properties": {
"issues": {
"type": "array",
"items": { "type": "string" }
},
"recommendations": {
"type": "array",
"items": { "type": "string" }
}
}
},
"auditSummary": {
"type": "array",
"items": {
"type": "string"
}
},
"nextSteps": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
“Mevcut Eylemler: Fetchandauditseodata” altında görmelisiniz.
Altında Gizlilik PolitikasıKendi Gizlilik Politikanıza Bir Bağlantı Ekleyin.
Son olarak, dokunun “Yaratmak”Sağ üstte ve istemleri takip edin.
Artık GPT'nizi görüntüleyebilirsiniz; Bu sayfa içi SEO denetimi GPT'ye benzer.
GPT'nizi test etmek ve seçeneklerinize aşina olmak
Kendi GPT'nizle uzun bir yol kat ettiniz ve bir şeyleri test etme zamanı.
İkinci karo üzerine dokunun, “SEO ayrıntılarını analiz edin.” Örnek.com'a varsayılan olarak olacaktır, ancak istediğiniz bir URL'yi test etmesini isteyebilirsiniz.
Deneyelim: Netflix.com, “Netflix.com'u URL olarak kullanın” isteyerek.
Artık her şeyin birlikte nasıl çalıştığını görmek için mevcut GPT seçeneklerinden herhangi birini deneyebilirsiniz.
GPT'nizi daha fazla özelleştirme
Oluşturduğunuz yere geri dönüp birkaç şeyi güncelleyerek GPT'nizi daha da özelleştirmek isteyebilirsiniz.
Konuşma başlatıcılarınızı ayarlamak için güncelleyin:
- Kullanıcı Yetkili.
- Tetikleyiciler ve yanıtlar ekleyerek ihtiyaçlarınızı daha iyi karşılamak için talimatları düzenleyin.
İsterseniz, işçinizin kodlamasına gidin ve listeye daha fazla kullanıcı aracısı eklemek için “const useragents” e ekleyin.
Artık özel GPT aracısınıza gidebilir ve sadece hangi sayfayı tarayacağınızı isteyebilirsiniz.
Bunu böyle bir şey isteyerek yapmak kolaydır: “URL'yi ThedesiredUrl olarak değiştirin” ve temsilciniz sizin için işe başlayacaktır.
Özetle
Bu özel GPT aracısı, chatgpt'in cloudflare çalışanlarıyla birleştirilmesinin temel SEO görevlerini nasıl düzene sokabileceğinin sadece bir örneğidir.
Temsilciyi deneyin ve ihtiyaçlarınız için değiştirin.
AI birçok görevle yardımcı olma kapasitesine sahiptir ve burada kalmak için burada. Bu nedenle, bu teknolojiyi bir asistan ve etkili bir araç olarak benimsemek, SEO'ların ölçekte daha verimli olmasına yardımcı olacak olasılıklara sahiptir.
Daha fazla kaynak:
Öne Çıkan Resim: ImageFlow/Shutterstock
Bir yanıt yazın