Guía técnica - 80+ comandos avanzados
Jorge Rolo
jorgejrolo.com
80+ comandos técnicos avanzados para análisis SEO profesional. Sin SSH, sin permisos especiales, 100% remoto. Optimiza tu workflow con comandos que uso diariamente en auditorías de sitios enterprise.
grep nativo NO soporta -P. Usa versiones Mac o instala: brew install grep
Instala Git Bash (incluido en Git for Windows)
Todos los comandos funcionan nativamente ✅
Detecta problemas de indexación, redirecciones mal configuradas y errores del servidor.
curl -I -s https://ejemplo.com | grep HTTPComprueba: 200 (OK), 301 (redirect), 404 (no encontrado), 500 (error servidor)
curl -o /dev/null -s -w "%{http_code}\n" https://ejemplo.comDevuelve solo: 200, 404, 500. Perfecto para scripts
curl -sL -w "%{url_effective}\n" -o /dev/null https://ejemplo.comDetecta www→no-www, http→https, etc.
curl -sL -I https://ejemplo.com | grep "HTTP\|Location"CRÍTICO: Detecta cadenas 301→301→200 que penalizan SEO
curl -I -s https://ejemplo.com | grep -i "location:"Si devuelve algo = hay redirect. Vacío = no redirige
while read url; do echo "$url: $(curl -o /dev/null -s -w "%{http_code}" $url)"; done < urls.txtCrea urls.txt con 1 URL por línea. Audita cientos en minutos
echo "Staging: $(curl -o /dev/null -s -w "%{http_code}" https://staging.ejemplo.com)"; echo "Prod: $(curl -o /dev/null -s -w "%{http_code}" https://ejemplo.com)"Validación pre-deploy. Asegura que ambos responden igual
curl -s https://ejemplo.com/no-existe | grep -i "not found\|404\|error"Páginas que devuelven 200 pero muestran error. Común en SPAs
Headers críticos: cache, compresión, seguridad, indexación.
curl -I -L https://ejemplo.com-L sigue redirects. Analiza: cache-control, content-encoding, server, x-robots-tag
curl -I -H "Accept-Encoding: gzip,br" https://ejemplo.com | grep -i "content-encoding"Debe mostrar 'gzip' o 'br'. Si vacío = NO comprime (penaliza CWV)
curl -I https://ejemplo.com | grep -i "cache-control"max-age=31536000 (1 año ideal). no-cache (dinámicas)
curl -I https://ejemplo.com | grep -i "x-robots-tag"CRÍTICO: Bloqueo vía HTTP header. Prevalece sobre meta robots
curl -I https://ejemplo.com | grep -i "server:"nginx, Apache, cloudflare. Análisis de competencia
curl -I https://ejemplo.com | grep -i "strict-transport-security"Fuerza HTTPS. max-age: 31536000. Google lo premia
curl -I https://ejemplo.com | grep -i "content-type"text/html, application/json. Valida tipo correcto
curl -I https://ejemplo.com | grep -i "etag"Identificador único versión. Optimiza caché
curl -I https://ejemplo.com | grep -i "last-modified"Freshness signals de Google
curl -I https://ejemplo.com | grep -iE "cf-|x-cache|x-amz"cf- = Cloudflare, x-cache = Varnish, x-amz = AWS CloudFront
Métricas de velocidad críticas para rankings.
curl -o /dev/null -s -w "TTFB: %{time_starttransfer}s\n" https://ejemplo.comCore Web Vital. <0.2s excelente, 0.2-0.6s bueno, >0.6s malo
curl -o /dev/null -s -w "Total: %{time_total}s\n" https://ejemplo.com<1s excelente, >3s problema
curl -w "DNS: %{time_namelookup}s\nConnect: %{time_connect}s\nSSL: %{time_appconnect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" -o /dev/null -s https://ejemplo.comBreakdown detallado. Identifica cuellos de botella
curl -o /dev/null -s -w "Tamaño: %{size_download} bytes\n" https://ejemplo.com<100KB ideal, >500KB problemático
curl -o /dev/null -s -w "Velocidad: %{speed_download} bytes/s\n" https://ejemplo.comVelocidad transferencia del servidor
curl -o /dev/null -s -w "DNS: %{time_namelookup}s\n" https://ejemplo.com<0.02s excelente. >0.1s investigar DNS
curl -o /dev/null -s -w "TCP: %{time_connect}s\n" https://ejemplo.comLatencia de red. Geolocalización servidor
curl -o /dev/null -s -w "SSL: %{time_appconnect}s\n" https://ejemplo.com<0.1s normal, >0.3s revisar certificado
Análisis completo de sitemaps XML y validaciones.
curl -s https://ejemplo.com/sitemap.xml | grep -c "<loc>"Límite 50,000 URLs por sitemap
Linux/Windows:
curl -s https://ejemplo.com/sitemap.xml | grep -oP "(?<=<loc>).*?(?=</loc>)" > urls.txtmacOS:
curl -s https://ejemplo.com/sitemap.xml | grep -o '<loc>[^<]*</loc>' | sed 's/<\/*loc>//g' > urls.txtExporta URLs a archivo de texto
Linux/Windows:
curl -s https://ejemplo.com/sitemap.xml | grep -oP "(?<=<loc>).*?(?=</loc>)" | sort | uniq -dmacOS:
curl -s https://ejemplo.com/sitemap.xml | grep -o '<loc>[^<]*</loc>' | sed 's/<\/*loc>//g' | sort | uniq -dError común en sitemaps dinámicos
Linux/Windows:
curl -s https://ejemplo.com/sitemap_index.xml | grep -oP "(?<=<loc>).*?(?=</loc>)" | while read sitemap; do curl -s "$sitemap" | grep -oP "(?<=<loc>).*?(?=</loc>)"; done > all_urls.txtmacOS:
curl -s https://ejemplo.com/sitemap_index.xml | grep -o '<loc>[^<]*</loc>' | sed 's/<\/*loc>//g' | while read sitemap; do curl -s "$sitemap" | grep -o '<loc>[^<]*</loc>' | sed 's/<\/*loc>//g'; done > all_urls.txtExtrae URLs de TODOS los sitemaps
curl -s https://ejemplo.com/sitemap_index.xml | grep -o '<loc>[^<]*</loc>' | sed 's/<\/*loc>//g' | while read sitemap; do count=$(curl -s "$sitemap" | grep -c '<loc>'); echo "$sitemap: $count URLs"; doneDistribución de URLs por sitemap
Extracción y validación de metadatos SEO.
Linux/Windows:
curl -s https://ejemplo.com | grep -oP "(?<=<title>).*?(?=</title>)"macOS:
curl -s https://ejemplo.com | grep -o '<title>[^<]*</title>' | sed 's/<\/*title>//g'Ideal 50-60 caracteres
Linux/Windows:
curl -s https://ejemplo.com | grep -oP '(?<=name="description" content=").*?(?=")'macOS:
curl -s https://ejemplo.com | grep 'name="description"' | sed -n 's/.*content="\([^"]*\).*/\1/p'Ideal 150-160 caracteres
Linux/Windows:
curl -s https://ejemplo.com | grep -oP '(?<=rel="canonical" href=").*?(?=")'macOS:
curl -s https://ejemplo.com | grep 'rel="canonical"' | sed -n 's/.*href="\([^"]*\).*/\1/p'Debe apuntar a URL correcta
curl -s https://ejemplo.com | grep -i 'meta name="robots"'noindex, nofollow, noarchive
curl -s https://ejemplo.com | grep -i "hreflang"SEO internacional
curl -s https://ejemplo.com | grep -i "og:"Facebook, LinkedIn optimización
curl -s https://ejemplo.com | grep -i 'name="viewport"'Mobile-friendly. Debe existir
echo "H2: $(curl -s https://ejemplo.com | grep -c '<h2')"; echo "H3: $(curl -s https://ejemplo.com | grep -c '<h3')"; echo "H4: $(curl -s https://ejemplo.com | grep -c '<h4')"Estructura jerárquica headings
Análisis de directivas de rastreo.
curl -s https://ejemplo.com/robots.txtRevisar todas las directivas
curl -s https://ejemplo.com/robots.txt | grep -i "disallow"URLs bloqueadas al rastreo
curl -s https://ejemplo.com/robots.txt | grep -A 5 "User-agent: Googlebot"Reglas específicas para Googlebot
curl -s https://ejemplo.com/robots.txt | grep -i "sitemap"robots.txt debe declarar sitemap
Análisis de estructura y enlaces.
curl -s https://ejemplo.com | sed 's/<[^>]*>//g' | wc -wLongitud contenido aproximada
curl -s https://ejemplo.com | grep -o 'href=' | wc -lTotal de enlaces en página
curl -s https://ejemplo.com | grep -c '<img'Cantidad de imágenes
curl -s https://ejemplo.com | grep '<img' | grep -v 'alt='Imágenes SIN alt (problema accesibilidad)
Validación de datos estructurados.
curl -s https://ejemplo.com | grep -i 'application/ld+json'Detecta presencia de Schema
curl -s https://ejemplo.com | sed -n '/<script type="application\/ld+json">/,/<\/script>/p'Extrae todo el structured data
curl -s https://ejemplo.com | grep -i '"@type".*"Product"'Validar schema de producto
curl -s https://ejemplo.com | grep -i 'BreadcrumbList'Schema de migas de pan
Validación completa de hreflang.
curl -s https://ejemplo.com | grep -i 'hreflang' | grep -oP 'hreflang="[^"]*"'Lista todos los idiomas
curl -s https://ejemplo.com | grep -i 'hreflang' | wc -lNúmero total de alternativas
curl -s https://ejemplo.com | grep 'hreflang="x-default"'CRÍTICO: CRÍTICO para SEO internacional
curl -s https://ejemplo.com | grep 'hreflang' | grep -oP 'hreflang="[^"]*"' | sort | uniqes-ES, en-GB, fr-FR formato correcto
Benchmarking y monitoreo.
for site in comp1.com comp2.com; do ttfb=$(curl -o /dev/null -s -w "%{time_starttransfer}" "https://$site"); echo "$site: ${ttfb}s"; doneBenchmark de velocidad
curl -I https://competidor.com | grep -iE "server|x-powered-by"Stack tecnológico del competidor
curl -I https://competidor.com | grep -iE "cf-|x-cache|fastly"Infraestructura del competidor
Proyectos donde uso estos comandos
Compártela con tu equipo y ayuda a más profesionales SEO a optimizar su workflow