Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

format

Blue Moused08da5716e7c
diff --git a/web/app/routes/tools.ctr-calculator.tsx b/web/app/routes/tools.ctr-calculator.tsx
index 10d7cb940..e2163f47c 100644
--- a/web/app/routes/tools.ctr-calculator.tsx
+++ b/web/app/routes/tools.ctr-calculator.tsx
@@ -146,177 +146,177 @@ export default function CTRCalculator() {
performance instantly
</Text>
- <div className='mt-12 rounded-xl bg-white p-8 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <div className='space-y-6'>
- <div>
- <h2 className='mb-6 text-2xl font-semibold text-gray-900 dark:text-white'>
- Calculate Your CTR
- </h2>
+ <div className='mt-12 rounded-xl bg-white p-8 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <div className='space-y-6'>
+ <div>
+ <h2 className='mb-6 text-2xl font-semibold text-gray-900 dark:text-white'>
+ Calculate Your CTR
+ </h2>
- <div className='grid gap-6 md:grid-cols-2'>
- <div>
- <Input
- type='number'
- placeholder='Enter number of clicks'
- label='Total Clicks'
- value={metrics.clicks}
- onChange={(e) =>
- handleMetricChange('clicks', e.target.value)
- }
- className='w-full'
- min='0'
- />
- <p className='mt-1 text-sm text-gray-500 dark:text-gray-400'>
- How many times your ad was clicked
- </p>
- </div>
+ <div className='grid gap-6 md:grid-cols-2'>
+ <div>
+ <Input
+ type='number'
+ placeholder='Enter number of clicks'
+ label='Total Clicks'
+ value={metrics.clicks}
+ onChange={(e) =>
+ handleMetricChange('clicks', e.target.value)
+ }
+ className='w-full'
+ min='0'
+ />
+ <p className='mt-1 text-sm text-gray-500 dark:text-gray-400'>
+ How many times your ad was clicked
+ </p>
+ </div>
- <div>
- <Input
- type='number'
- placeholder='Enter number of impressions'
- label='Total Impressions'
- value={metrics.impressions}
- onChange={(e) =>
- handleMetricChange('impressions', e.target.value)
- }
- className='w-full'
- min='1'
- />
- <p className='mt-1 text-sm text-gray-500 dark:text-gray-400'>
- How many times your ad was shown
- </p>
+ <div>
+ <Input
+ type='number'
+ placeholder='Enter number of impressions'
+ label='Total Impressions'
+ value={metrics.impressions}
+ onChange={(e) =>
+ handleMetricChange('impressions', e.target.value)
+ }
+ className='w-full'
+ min='1'
+ />
+ <p className='mt-1 text-sm text-gray-500 dark:text-gray-400'>
+ How many times your ad was shown
+ </p>
+ </div>
</div>
- </div>
- <div className='mt-6'>
- <Button onClick={reset} regular>
- Reset
- </Button>
+ <div className='mt-6'>
+ <Button onClick={reset} regular>
+ Reset
+ </Button>
+ </div>
</div>
- </div>
- {result ? (
- <div className='border-t border-gray-200 pt-6 dark:border-gray-700'>
- <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
- Results
- </h3>
-
- <div className='rounded-lg bg-gray-50 p-6 dark:bg-slate-700/50'>
- <div className='text-center'>
- <div className='text-5xl font-bold text-gray-900 dark:text-white'>
- {result.ctr.toFixed(2)}%
- </div>
- <div className='mt-2 text-lg text-gray-600 dark:text-gray-400'>
- Click-Through Rate
- </div>
- <div
- className={`mt-4 text-lg font-semibold ${result.color}`}
- >
- {result.performance} Performance
- </div>
- </div>
+ {result ? (
+ <div className='border-t border-gray-200 pt-6 dark:border-gray-700'>
+ <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
+ Results
+ </h3>
- <div className='mt-6 grid gap-4 text-sm md:grid-cols-2'>
- <div className='rounded-lg bg-white p-4 dark:bg-slate-800'>
- <div className='text-gray-500 dark:text-gray-400'>
- Formula Used
+ <div className='rounded-lg bg-gray-50 p-6 dark:bg-slate-700/50'>
+ <div className='text-center'>
+ <div className='text-5xl font-bold text-gray-900 dark:text-white'>
+ {result.ctr.toFixed(2)}%
</div>
- <div className='mt-1 font-mono text-gray-900 dark:text-white'>
- CTR = (Clicks ÷ Impressions) × 100
+ <div className='mt-2 text-lg text-gray-600 dark:text-gray-400'>
+ Click-Through Rate
+ </div>
+ <div
+ className={`mt-4 text-lg font-semibold ${result.color}`}
+ >
+ {result.performance} Performance
</div>
</div>
- <div className='rounded-lg bg-white p-4 dark:bg-slate-800'>
- <div className='text-gray-500 dark:text-gray-400'>
- Your Calculation
+
+ <div className='mt-6 grid gap-4 text-sm md:grid-cols-2'>
+ <div className='rounded-lg bg-white p-4 dark:bg-slate-800'>
+ <div className='text-gray-500 dark:text-gray-400'>
+ Formula Used
+ </div>
+ <div className='mt-1 font-mono text-gray-900 dark:text-white'>
+ CTR = (Clicks ÷ Impressions) × 100
+ </div>
</div>
- <div className='mt-1 font-mono text-gray-900 dark:text-white'>
- ({metrics.clicks} ÷ {metrics.impressions}) × 100
+ <div className='rounded-lg bg-white p-4 dark:bg-slate-800'>
+ <div className='text-gray-500 dark:text-gray-400'>
+ Your Calculation
+ </div>
+ <div className='mt-1 font-mono text-gray-900 dark:text-white'>
+ ({metrics.clicks} ÷ {metrics.impressions}) × 100
+ </div>
</div>
</div>
</div>
- </div>
- <div className='mt-6 rounded-lg bg-indigo-50 p-4 dark:bg-indigo-900/20'>
- <h4 className='flex items-center text-lg font-medium text-indigo-900 dark:text-indigo-300'>
- <TrendingUpIcon className='mr-2 h-5 w-5' />
- Performance Insights
- </h4>
- <p className='mt-2 text-sm text-indigo-800 dark:text-indigo-200'>
- {result.performance === 'Excellent'
- ? 'Outstanding CTR! Your ads are highly engaging and relevant to your audience. Keep up the great work!'
- : null}
- {result.performance === 'Good'
- ? 'Good CTR! Your ads are performing well. Consider A/B testing to push performance even higher.'
- : null}
- {result.performance === 'Average'
- ? "Average CTR. There's room for improvement. Try refining your targeting or ad copy."
- : null}
- {result.performance === 'Below Average'
- ? 'Below average CTR. Consider reviewing your ad relevance, targeting, and creative elements.'
- : null}
- {result.performance === 'Poor'
- ? 'Low CTR indicates your ads may not be resonating with your audience. Consider a comprehensive review of your campaign strategy.'
- : null}
- </p>
+ <div className='mt-6 rounded-lg bg-indigo-50 p-4 dark:bg-indigo-900/20'>
+ <h4 className='flex items-center text-lg font-medium text-indigo-900 dark:text-indigo-300'>
+ <TrendingUpIcon className='mr-2 h-5 w-5' />
+ Performance Insights
+ </h4>
+ <p className='mt-2 text-sm text-indigo-800 dark:text-indigo-200'>
+ {result.performance === 'Excellent'
+ ? 'Outstanding CTR! Your ads are highly engaging and relevant to your audience. Keep up the great work!'
+ : null}
+ {result.performance === 'Good'
+ ? 'Good CTR! Your ads are performing well. Consider A/B testing to push performance even higher.'
+ : null}
+ {result.performance === 'Average'
+ ? "Average CTR. There's room for improvement. Try refining your targeting or ad copy."
+ : null}
+ {result.performance === 'Below Average'
+ ? 'Below average CTR. Consider reviewing your ad relevance, targeting, and creative elements.'
+ : null}
+ {result.performance === 'Poor'
+ ? 'Low CTR indicates your ads may not be resonating with your audience. Consider a comprehensive review of your campaign strategy.'
+ : null}
+ </p>
+ </div>
</div>
- </div>
- ) : null}
+ ) : null}
+ </div>
</div>
- </div>
- <div className='mt-16'>
- <h2 className='mb-8 text-center text-3xl font-bold text-gray-900 dark:text-white'>
- Frequently Asked Questions
- </h2>
+ <div className='mt-16'>
+ <h2 className='mb-8 text-center text-3xl font-bold text-gray-900 dark:text-white'>
+ Frequently Asked Questions
+ </h2>
- <div className='space-y-4'>
- {FAQ_ITEMS.map((item, index) => (
- <details
- key={index}
- className='group rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-slate-800'
- >
- <summary className='flex w-full cursor-pointer items-center justify-between px-6 py-4 text-left hover:bg-gray-50 dark:hover:bg-slate-700/50'>
- <h3 className='text-lg font-medium text-gray-900 dark:text-white'>
- {item.question}
- </h3>
- <ChevronDownIcon className='h-5 w-5 text-gray-500 transition-transform group-open:rotate-180' />
- </summary>
- <div className='border-t border-gray-200 px-6 py-4 dark:border-gray-700'>
- <p className='text-gray-600 dark:text-gray-400'>
- {item.answer}
- </p>
- </div>
- </details>
- ))}
+ <div className='space-y-4'>
+ {FAQ_ITEMS.map((item, index) => (
+ <details
+ key={index}
+ className='group rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-slate-800'
+ >
+ <summary className='flex w-full cursor-pointer items-center justify-between px-6 py-4 text-left hover:bg-gray-50 dark:hover:bg-slate-700/50'>
+ <h3 className='text-lg font-medium text-gray-900 dark:text-white'>
+ {item.question}
+ </h3>
+ <ChevronDownIcon className='h-5 w-5 text-gray-500 transition-transform group-open:rotate-180' />
+ </summary>
+ <div className='border-t border-gray-200 px-6 py-4 dark:border-gray-700'>
+ <p className='text-gray-600 dark:text-gray-400'>
+ {item.answer}
+ </p>
+ </div>
+ </details>
+ ))}
+ </div>
</div>
- </div>
- {/* FAQ Structured Data */}
- <script
- type='application/ld+json'
- dangerouslySetInnerHTML={{
- __html: JSON.stringify({
- '@context': 'https://schema.org',
- '@type': 'FAQPage',
- mainEntity: FAQ_ITEMS.map((item) => ({
- '@type': 'Question',
- name: item.question,
- acceptedAnswer: {
- '@type': 'Answer',
- text: item.answer,
- },
- })),
- })
- .replace(/</g, '\\u003c')
- .replace(/\u2028|\u2029/g, ''),
- }}
- />
+ {/* FAQ Structured Data */}
+ <script
+ type='application/ld+json'
+ dangerouslySetInnerHTML={{
+ __html: JSON.stringify({
+ '@context': 'https://schema.org',
+ '@type': 'FAQPage',
+ mainEntity: FAQ_ITEMS.map((item) => ({
+ '@type': 'Question',
+ name: item.question,
+ acceptedAnswer: {
+ '@type': 'Answer',
+ text: item.answer,
+ },
+ })),
+ })
+ .replace(/</g, '\\u003c')
+ .replace(/\u2028|\u2029/g, ''),
+ }}
+ />
<DitchGoogle />
</div>
- <aside className='hidden lg:block lg:w-64 lg:shrink-0 lg:sticky lg:top-12 lg:self-start'>
+ <aside className='hidden lg:sticky lg:top-12 lg:block lg:w-64 lg:shrink-0 lg:self-start'>
<ToolsNav />
</aside>
</div>
diff --git a/web/app/routes/tools.ip-lookup.tsx b/web/app/routes/tools.ip-lookup.tsx
index 0a9c64c86..26104dcf9 100644
--- a/web/app/routes/tools.ip-lookup.tsx
+++ b/web/app/routes/tools.ip-lookup.tsx
@@ -273,341 +273,347 @@ export default function IpLookup() {
</Text>
<div className='mt-10'>
- <form onSubmit={handleSubmit} className='flex items-start gap-3'>
- <Input
- type='text'
- placeholder='Enter IP address (e.g., 8.8.8.8)'
- value={ipInput}
- onChange={handleInputChange}
- error={displayError}
- className='flex-1'
- />
- <Button
- type='submit'
- primary
- regular
- disabled={isLoading}
- className='mt-px'
- >
- {isLoading ? (
- <Spin className='h-4 w-4' />
- ) : (
- <>
- <MagnifyingGlassIcon className='mr-1.5 h-4 w-4' />
- Lookup
- </>
- )}
- </Button>
- </form>
- </div>
-
- {data && (
- <div className='mt-6 space-y-8'>
- <section className='overflow-hidden rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <div className='mb-6 flex items-start gap-4'>
- {data.country && (
- <Flag
- className='shrink-0 rounded-xs'
- country={data.country}
- size={40}
- alt={data.countryName || data.country}
- />
+ <form onSubmit={handleSubmit} className='flex items-start gap-3'>
+ <Input
+ type='text'
+ placeholder='Enter IP address (e.g., 8.8.8.8)'
+ value={ipInput}
+ onChange={handleInputChange}
+ error={displayError}
+ className='flex-1'
+ />
+ <Button
+ type='submit'
+ primary
+ regular
+ disabled={isLoading}
+ className='mt-px'
+ >
+ {isLoading ? (
+ <Spin className='h-4 w-4' />
+ ) : (
+ <>
+ <MagnifyingGlassIcon className='mr-1.5 h-4 w-4' />
+ Lookup
+ </>
)}
- <div className='min-w-0 flex-1'>
- <Text
- as='p'
- size='2xl'
- weight='semibold'
- className='break-all font-mono'
- >
- {data.ip}
- </Text>
- {formatLocation() && (
- <Text as='p' colour='muted' className='mt-0.5 wrap-break-word'>
- {formatLocation()}
- </Text>
+ </Button>
+ </form>
+ </div>
+
+ {data && (
+ <div className='mt-6 space-y-8'>
+ <section className='overflow-hidden rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <div className='mb-6 flex items-start gap-4'>
+ {data.country && (
+ <Flag
+ className='shrink-0 rounded-xs'
+ country={data.country}
+ size={40}
+ alt={data.countryName || data.country}
+ />
)}
+ <div className='min-w-0 flex-1'>
+ <Text
+ as='p'
+ size='2xl'
+ weight='semibold'
+ className='font-mono break-all'
+ >
+ {data.ip}
+ </Text>
+ {formatLocation() && (
+ <Text
+ as='p'
+ colour='muted'
+ className='mt-0.5 wrap-break-word'
+ >
+ {formatLocation()}
+ </Text>
+ )}
+ </div>
</div>
- </div>
- <dl>
- <DataRow
- label='IP Version'
- value={data.ipVersion ? `IPv${data.ipVersion}` : null}
- />
- <DataRow
- label='Country'
- value={data.countryName}
- secondary={data.country}
- />
- <DataRow
- label='Region'
- value={data.region}
- secondary={data.regionCode}
- />
- <DataRow label='City' value={data.city} />
- <DataRow label='Postal Code' value={data.postalCode} />
- <DataRow
- label='Continent'
- value={data.continentName}
- secondary={data.continentCode}
- />
- <DataRow
- label='Coordinates'
- value={
- hasCoordinates
- ? `${data.latitude?.toFixed(4)}, ${data.longitude?.toFixed(4)}`
- : null
- }
- />
- <DataRow label='Timezone' value={data.timezone} />
- {data.isInEuropeanUnion && (
- <DataRow label='EU Member' value='Yes' />
- )}
- </dl>
- </section>
-
- {hasCoordinates && (
- <section className='overflow-hidden rounded-xl ring-1 ring-gray-200 dark:ring-slate-700'>
- <ClientOnly
- fallback={
- <div className='flex h-96 items-center justify-center bg-gray-50 dark:bg-slate-800'>
- <Spin />
- </div>
- }
- >
- {() => (
- <LocationMap
- latitude={data.latitude!}
- longitude={data.longitude!}
- city={data.city}
- country={data.countryName}
- />
+ <dl>
+ <DataRow
+ label='IP Version'
+ value={data.ipVersion ? `IPv${data.ipVersion}` : null}
+ />
+ <DataRow
+ label='Country'
+ value={data.countryName}
+ secondary={data.country}
+ />
+ <DataRow
+ label='Region'
+ value={data.region}
+ secondary={data.regionCode}
+ />
+ <DataRow label='City' value={data.city} />
+ <DataRow label='Postal Code' value={data.postalCode} />
+ <DataRow
+ label='Continent'
+ value={data.continentName}
+ secondary={data.continentCode}
+ />
+ <DataRow
+ label='Coordinates'
+ value={
+ hasCoordinates
+ ? `${data.latitude?.toFixed(4)}, ${data.longitude?.toFixed(4)}`
+ : null
+ }
+ />
+ <DataRow label='Timezone' value={data.timezone} />
+ {data.isInEuropeanUnion && (
+ <DataRow label='EU Member' value='Yes' />
)}
- </ClientOnly>
+ </dl>
</section>
- )}
- </div>
- )}
- <section className='mt-20 border-t border-gray-200 pt-16 dark:border-slate-700'>
- <Text as='h2' size='3xl' weight='bold' tracking='tight'>
- Free IP Address Lookup Tool
- </Text>
- <Text
- as='p'
- size='lg'
- colour='muted'
- className='mt-4 leading-relaxed'
- >
- Wondering "what is my IP address?" Our free IP lookup tool
- instantly shows your public IP address and provides detailed
- geolocation data including country, city, region, coordinates, and
- timezone. You can also look up any IPv4 or IPv6 address to find
- its location and network information.
- </Text>
-
- <div className='mt-12 grid gap-x-12 gap-y-10 md:grid-cols-2'>
- <div>
- <Text as='h3' size='xl' weight='semibold'>
- What is an IP Address?
- </Text>
- <Text as='p' colour='muted' className='mt-3'>
- An IP (Internet Protocol) address is a unique numerical
- identifier assigned to every device connected to the internet.
- It works like a mailing address, allowing data to be routed to
- and from your device. There are two formats:{' '}
- <Text as='span' weight='semibold' colour='inherit'>
- IPv4
- </Text>{' '}
- (e.g., 192.168.1.1) with about 4.3 billion possible addresses,
- and{' '}
- <Text as='span' weight='semibold' colour='inherit'>
- IPv6
- </Text>{' '}
- (e.g., 2001:0db8:85a3::8a2e:0370:7334) which provides
- virtually unlimited addresses.
- </Text>
+ {hasCoordinates && (
+ <section className='overflow-hidden rounded-xl ring-1 ring-gray-200 dark:ring-slate-700'>
+ <ClientOnly
+ fallback={
+ <div className='flex h-96 items-center justify-center bg-gray-50 dark:bg-slate-800'>
+ <Spin />
+ </div>
+ }
+ >
+ {() => (
+ <LocationMap
+ latitude={data.latitude!}
+ longitude={data.longitude!}
+ city={data.city}
+ country={data.countryName}
+ />
+ )}
+ </ClientOnly>
+ </section>
+ )}
</div>
+ )}
- <div>
- <Text as='h3' size='xl' weight='semibold'>
- How IP Geolocation Works
- </Text>
- <Text as='p' colour='muted' className='mt-3'>
- IP geolocation determines the approximate physical location of
- an IP address by analyzing routing information and regional IP
- allocations. Our tool uses the DB-IP database to provide
- accurate country-level data (95%+ accuracy) and city-level
- estimates (50-80% accuracy). The location typically represents
- your ISP's network center, not your exact address.
- </Text>
- </div>
+ <section className='mt-20 border-t border-gray-200 pt-16 dark:border-slate-700'>
+ <Text as='h2' size='3xl' weight='bold' tracking='tight'>
+ Free IP Address Lookup Tool
+ </Text>
+ <Text
+ as='p'
+ size='lg'
+ colour='muted'
+ className='mt-4 leading-relaxed'
+ >
+ Wondering "what is my IP address?" Our free IP lookup tool
+ instantly shows your public IP address and provides detailed
+ geolocation data including country, city, region, coordinates,
+ and timezone. You can also look up any IPv4 or IPv6 address to
+ find its location and network information.
+ </Text>
- <div>
- <Text as='h3' size='xl' weight='semibold'>
- Common Use Cases
- </Text>
- <ul className='mt-3 space-y-2'>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Security monitoring
- </Text>{' '}
- - Identify suspicious login attempts from unusual
- locations
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Fraud prevention
- </Text>{' '}
- - Verify user locations to detect potentially fraudulent
- activity
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Content localization
- </Text>{' '}
- - Serve region-specific content based on visitor location
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Compliance
- </Text>{' '}
- - Enforce geographic restrictions for regulatory
- requirements
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Analytics
- </Text>{' '}
- - Understand where your website visitors are located
- </Text>
- </li>
- </ul>
+ <div className='mt-12 grid gap-x-12 gap-y-10 md:grid-cols-2'>
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ What is an IP Address?
+ </Text>
+ <Text as='p' colour='muted' className='mt-3'>
+ An IP (Internet Protocol) address is a unique numerical
+ identifier assigned to every device connected to the
+ internet. It works like a mailing address, allowing data to
+ be routed to and from your device. There are two formats:{' '}
+ <Text as='span' weight='semibold' colour='inherit'>
+ IPv4
+ </Text>{' '}
+ (e.g., 192.168.1.1) with about 4.3 billion possible
+ addresses, and{' '}
+ <Text as='span' weight='semibold' colour='inherit'>
+ IPv6
+ </Text>{' '}
+ (e.g., 2001:0db8:85a3::8a2e:0370:7334) which provides
+ virtually unlimited addresses.
+ </Text>
+ </div>
+
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ How IP Geolocation Works
+ </Text>
+ <Text as='p' colour='muted' className='mt-3'>
+ IP geolocation determines the approximate physical location
+ of an IP address by analyzing routing information and
+ regional IP allocations. Our tool uses the DB-IP database to
+ provide accurate country-level data (95%+ accuracy) and
+ city-level estimates (50-80% accuracy). The location
+ typically represents your ISP's network center, not your
+ exact address.
+ </Text>
+ </div>
+
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ Common Use Cases
+ </Text>
+ <ul className='mt-3 space-y-2'>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Security monitoring
+ </Text>{' '}
+ - Identify suspicious login attempts from unusual
+ locations
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Fraud prevention
+ </Text>{' '}
+ - Verify user locations to detect potentially fraudulent
+ activity
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Content localization
+ </Text>{' '}
+ - Serve region-specific content based on visitor
+ location
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Compliance
+ </Text>{' '}
+ - Enforce geographic restrictions for regulatory
+ requirements
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Analytics
+ </Text>{' '}
+ - Understand where your website visitors are located
+ </Text>
+ </li>
+ </ul>
+ </div>
+
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ What Data is Included
+ </Text>
+ <ul className='mt-3 space-y-2'>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Geographic location
+ </Text>{' '}
+ - Country, region/state, city, and postal code
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Coordinates
+ </Text>{' '}
+ - Latitude and longitude for mapping
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Timezone
+ </Text>{' '}
+ - The timezone associated with the IP location
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ IP version
+ </Text>{' '}
+ - Whether the address is IPv4 or IPv6
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ EU status
+ </Text>{' '}
+ - Whether the IP is located in the European Union
+ </Text>
+ </li>
+ </ul>
+ </div>
</div>
- <div>
+ <div className='mt-12'>
<Text as='h3' size='xl' weight='semibold'>
- What Data is Included
+ How to Use This IP Checker
+ </Text>
+ <Text as='p' colour='muted' className='mt-3'>
+ Your IP address is automatically detected when you visit this
+ page. To look up a different IP, simply enter any public IPv4
+ or IPv6 address in the search box above and click "Lookup."
+ The results will show the geographic location on an
+ interactive map along with detailed network information. This
+ tool is completely free - no registration or limits.
</Text>
- <ul className='mt-3 space-y-2'>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Geographic location
- </Text>{' '}
- - Country, region/state, city, and postal code
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Coordinates
- </Text>{' '}
- - Latitude and longitude for mapping
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Timezone
- </Text>{' '}
- - The timezone associated with the IP location
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- IP version
- </Text>{' '}
- - Whether the address is IPv4 or IPv6
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- EU status
- </Text>{' '}
- - Whether the IP is located in the European Union
- </Text>
- </li>
- </ul>
</div>
- </div>
+ </section>
- <div className='mt-12'>
- <Text as='h3' size='xl' weight='semibold'>
- How to Use This IP Checker
+ <section className='mt-16'>
+ <Text as='h2' size='2xl' weight='bold' className='mb-6'>
+ FAQ
</Text>
- <Text as='p' colour='muted' className='mt-3'>
- Your IP address is automatically detected when you visit this
- page. To look up a different IP, simply enter any public IPv4 or
- IPv6 address in the search box above and click "Lookup." The
- results will show the geographic location on an interactive map
- along with detailed network information. This tool is completely
- free - no registration or limits.
- </Text>
- </div>
- </section>
- <section className='mt-16'>
- <Text as='h2' size='2xl' weight='bold' className='mb-6'>
- FAQ
- </Text>
-
- <div className='space-y-3'>
- {FAQ_ITEMS.map((item, index) => (
- <details
- key={index}
- className='group rounded-lg border border-gray-200 bg-white dark:border-slate-700 dark:bg-slate-800'
- >
- <summary className='flex cursor-pointer items-center justify-between px-5 py-4 text-left'>
- <Text weight='medium'>{item.question}</Text>
- <ChevronDownIcon className='h-5 w-5 shrink-0 text-gray-400 transition-transform group-open:rotate-180' />
- </summary>
- <div className='border-t border-gray-200 px-5 py-4 dark:border-slate-700'>
- <Text as='p' colour='muted'>
- {item.answer}
- </Text>
- </div>
- </details>
- ))}
- </div>
- </section>
-
- <script
- type='application/ld+json'
- dangerouslySetInnerHTML={{
- __html: JSON.stringify({
- '@context': 'https://schema.org',
- '@type': 'FAQPage',
- mainEntity: FAQ_ITEMS.map((item) => ({
- '@type': 'Question',
- name: item.question,
- acceptedAnswer: {
- '@type': 'Answer',
- text: item.answer,
- },
- })),
- })
- .replace(/</g, '\\u003c')
- .replace(/\u2028|\u2029/g, ''),
- }}
- />
+ <div className='space-y-3'>
+ {FAQ_ITEMS.map((item, index) => (
+ <details
+ key={index}
+ className='group rounded-lg border border-gray-200 bg-white dark:border-slate-700 dark:bg-slate-800'
+ >
+ <summary className='flex cursor-pointer items-center justify-between px-5 py-4 text-left'>
+ <Text weight='medium'>{item.question}</Text>
+ <ChevronDownIcon className='h-5 w-5 shrink-0 text-gray-400 transition-transform group-open:rotate-180' />
+ </summary>
+ <div className='border-t border-gray-200 px-5 py-4 dark:border-slate-700'>
+ <Text as='p' colour='muted'>
+ {item.answer}
+ </Text>
+ </div>
+ </details>
+ ))}
+ </div>
+ </section>
+
+ <script
+ type='application/ld+json'
+ dangerouslySetInnerHTML={{
+ __html: JSON.stringify({
+ '@context': 'https://schema.org',
+ '@type': 'FAQPage',
+ mainEntity: FAQ_ITEMS.map((item) => ({
+ '@type': 'Question',
+ name: item.question,
+ acceptedAnswer: {
+ '@type': 'Answer',
+ text: item.answer,
+ },
+ })),
+ })
+ .replace(/</g, '\\u003c')
+ .replace(/\u2028|\u2029/g, ''),
+ }}
+ />
<DitchGoogle />
</div>
- <aside className='hidden lg:block lg:w-64 lg:shrink-0 lg:sticky lg:top-12 lg:self-start'>
+ <aside className='hidden lg:sticky lg:top-12 lg:block lg:w-64 lg:shrink-0 lg:self-start'>
<ToolsNav />
</aside>
</div>
diff --git a/web/app/routes/tools.roi-calculator.tsx b/web/app/routes/tools.roi-calculator.tsx
index 392981b03..eb43f1254 100644
--- a/web/app/routes/tools.roi-calculator.tsx
+++ b/web/app/routes/tools.roi-calculator.tsx
@@ -216,361 +216,361 @@ export default function ROICalculator() {
marketing campaign performance
</Text>
- <div className='mt-12 grid gap-8 lg:grid-cols-3'>
- {/* Input Section */}
- <div className='lg:col-span-2'>
- <div className='rounded-xl bg-white p-8 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <h2 className='mb-6 text-2xl font-semibold text-gray-900 dark:text-white'>
- Campaign Metrics
- </h2>
-
- <div className='space-y-6'>
- <Input
- type='text'
- placeholder='Q4 Facebook Campaign'
- label='Campaign Name (optional)'
- value={metrics.campaignName}
- onChange={(e) =>
- handleMetricChange('campaignName', e.target.value)
- }
- className='w-full'
- />
-
- <div className='grid gap-6 md:grid-cols-2'>
- <div>
- <Input
- type='number'
- placeholder='5000'
- label={
- <>
- Ad Spend ($)
- <Tooltip
- className='ml-1'
- text='Total amount spent on advertising for this campaign'
- />
- </>
- }
- value={metrics.adSpend || ''}
- onChange={(e) =>
- handleMetricChange('adSpend', e.target.value)
- }
- className='w-full'
- />
- </div>
+ <div className='mt-12 grid gap-8 lg:grid-cols-3'>
+ {/* Input Section */}
+ <div className='lg:col-span-2'>
+ <div className='rounded-xl bg-white p-8 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <h2 className='mb-6 text-2xl font-semibold text-gray-900 dark:text-white'>
+ Campaign Metrics
+ </h2>
+
+ <div className='space-y-6'>
+ <Input
+ type='text'
+ placeholder='Q4 Facebook Campaign'
+ label='Campaign Name (optional)'
+ value={metrics.campaignName}
+ onChange={(e) =>
+ handleMetricChange('campaignName', e.target.value)
+ }
+ className='w-full'
+ />
+
+ <div className='grid gap-6 md:grid-cols-2'>
+ <div>
+ <Input
+ type='number'
+ placeholder='5000'
+ label={
+ <>
+ Ad Spend ($)
+ <Tooltip
+ className='ml-1'
+ text='Total amount spent on advertising for this campaign'
+ />
+ </>
+ }
+ value={metrics.adSpend || ''}
+ onChange={(e) =>
+ handleMetricChange('adSpend', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
- <div>
- <Input
- type='number'
- placeholder='15000'
- label={
- <>
- Revenue Generated ($)
- <Tooltip
- className='ml-1'
- text='Total revenue attributed to this campaign'
- />
- </>
- }
- value={metrics.revenue || ''}
- onChange={(e) =>
- handleMetricChange('revenue', e.target.value)
- }
- className='w-full'
- />
- </div>
+ <div>
+ <Input
+ type='number'
+ placeholder='15000'
+ label={
+ <>
+ Revenue Generated ($)
+ <Tooltip
+ className='ml-1'
+ text='Total revenue attributed to this campaign'
+ />
+ </>
+ }
+ value={metrics.revenue || ''}
+ onChange={(e) =>
+ handleMetricChange('revenue', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
- <div>
- <Input
- type='number'
- placeholder='150'
- label={
- <>
- Conversions
- <Tooltip
- className='ml-1'
- text='Number of conversions (sales, sign-ups, etc.)'
- />
- </>
- }
- value={metrics.conversions || ''}
- onChange={(e) =>
- handleMetricChange('conversions', e.target.value)
- }
- className='w-full'
- />
- </div>
+ <div>
+ <Input
+ type='number'
+ placeholder='150'
+ label={
+ <>
+ Conversions
+ <Tooltip
+ className='ml-1'
+ text='Number of conversions (sales, sign-ups, etc.)'
+ />
+ </>
+ }
+ value={metrics.conversions || ''}
+ onChange={(e) =>
+ handleMetricChange('conversions', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
- <div>
- <Input
- type='number'
- placeholder='2000'
- label={
- <>
- Clicks
- <Tooltip
- className='ml-1'
- text='Total number of clicks on your ads'
- />
- </>
- }
- value={metrics.clicks || ''}
- onChange={(e) =>
- handleMetricChange('clicks', e.target.value)
- }
- className='w-full'
- />
- </div>
+ <div>
+ <Input
+ type='number'
+ placeholder='2000'
+ label={
+ <>
+ Clicks
+ <Tooltip
+ className='ml-1'
+ text='Total number of clicks on your ads'
+ />
+ </>
+ }
+ value={metrics.clicks || ''}
+ onChange={(e) =>
+ handleMetricChange('clicks', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
- <div>
- <Input
- type='number'
- placeholder='100000'
- label={
- <>
- Impressions
- <Tooltip
- className='ml-1'
- text='Total number of times your ads were shown'
- />
- </>
- }
- value={metrics.impressions || ''}
- onChange={(e) =>
- handleMetricChange('impressions', e.target.value)
- }
- className='w-full'
- />
- </div>
+ <div>
+ <Input
+ type='number'
+ placeholder='100000'
+ label={
+ <>
+ Impressions
+ <Tooltip
+ className='ml-1'
+ text='Total number of times your ads were shown'
+ />
+ </>
+ }
+ value={metrics.impressions || ''}
+ onChange={(e) =>
+ handleMetricChange('impressions', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
- <div>
- <Input
- type='number'
- placeholder='30'
- label={
- <>
- Profit Margin (%)
- <Tooltip
- className='ml-1'
- text='Your average profit margin on products/services'
- />
- </>
- }
- value={profitMargin || ''}
- onChange={(e) =>
- setProfitMargin(parseFloat(e.target.value) || 0)
- }
- className='w-full'
- />
+ <div>
+ <Input
+ type='number'
+ placeholder='30'
+ label={
+ <>
+ Profit Margin (%)
+ <Tooltip
+ className='ml-1'
+ text='Your average profit margin on products/services'
+ />
+ </>
+ }
+ value={profitMargin || ''}
+ onChange={(e) =>
+ setProfitMargin(parseFloat(e.target.value) || 0)
+ }
+ className='w-full'
+ />
+ </div>
</div>
</div>
</div>
</div>
- </div>
- {/* Results Section */}
- <div className='lg:col-span-1'>
- <div className='sticky top-8 space-y-6'>
- {/* Primary Metrics */}
- <div className='rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <h3 className='mb-4 text-lg font-semibold text-gray-900 dark:text-white'>
- Key Performance Metrics
- </h3>
-
- <div className='space-y-4'>
- <div className='flex items-center justify-between rounded-lg bg-gray-50 p-4 dark:bg-slate-700/50'>
- <div className='flex items-center'>
- <TrendingUpIcon className='mr-2 h-5 w-5 text-gray-500 dark:text-gray-400' />
- <span className='font-medium text-gray-700 dark:text-gray-300'>
- ROI
+ {/* Results Section */}
+ <div className='lg:col-span-1'>
+ <div className='sticky top-8 space-y-6'>
+ {/* Primary Metrics */}
+ <div className='rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <h3 className='mb-4 text-lg font-semibold text-gray-900 dark:text-white'>
+ Key Performance Metrics
+ </h3>
+
+ <div className='space-y-4'>
+ <div className='flex items-center justify-between rounded-lg bg-gray-50 p-4 dark:bg-slate-700/50'>
+ <div className='flex items-center'>
+ <TrendingUpIcon className='mr-2 h-5 w-5 text-gray-500 dark:text-gray-400' />
+ <span className='font-medium text-gray-700 dark:text-gray-300'>
+ ROI
+ </span>
+ </div>
+ <span
+ className={`text-2xl font-bold ${getROIColor(calculated.roi)}`}
+ >
+ {formatPercentage(calculated.roi)}
</span>
</div>
- <span
- className={`text-2xl font-bold ${getROIColor(calculated.roi)}`}
- >
- {formatPercentage(calculated.roi)}
- </span>
- </div>
- <div className='flex items-center justify-between rounded-lg bg-gray-50 p-4 dark:bg-slate-700/50'>
- <div className='flex items-center'>
- <DollarSignIcon className='mr-2 h-5 w-5 text-gray-500 dark:text-gray-400' />
- <span className='font-medium text-gray-700 dark:text-gray-300'>
- ROAS
+ <div className='flex items-center justify-between rounded-lg bg-gray-50 p-4 dark:bg-slate-700/50'>
+ <div className='flex items-center'>
+ <DollarSignIcon className='mr-2 h-5 w-5 text-gray-500 dark:text-gray-400' />
+ <span className='font-medium text-gray-700 dark:text-gray-300'>
+ ROAS
+ </span>
+ </div>
+ <span
+ className={`text-2xl font-bold ${getROASColor(calculated.roas)}`}
+ >
+ {formatRatio(calculated.roas)}
</span>
</div>
- <span
- className={`text-2xl font-bold ${getROASColor(calculated.roas)}`}
- >
- {formatRatio(calculated.roas)}
- </span>
- </div>
- <div className='flex items-center justify-between rounded-lg bg-gray-50 p-4 dark:bg-slate-700/50'>
- <div className='flex items-center'>
- <ShoppingCartIcon className='mr-2 h-5 w-5 text-gray-500 dark:text-gray-400' />
- <span className='font-medium text-gray-700 dark:text-gray-300'>
- Profit
+ <div className='flex items-center justify-between rounded-lg bg-gray-50 p-4 dark:bg-slate-700/50'>
+ <div className='flex items-center'>
+ <ShoppingCartIcon className='mr-2 h-5 w-5 text-gray-500 dark:text-gray-400' />
+ <span className='font-medium text-gray-700 dark:text-gray-300'>
+ Profit
+ </span>
+ </div>
+ <span
+ className={`text-xl font-bold ${calculated.profit >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400'}`}
+ >
+ {formatCurrency(calculated.profit)}
</span>
</div>
- <span
- className={`text-xl font-bold ${calculated.profit >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400'}`}
- >
- {formatCurrency(calculated.profit)}
- </span>
</div>
</div>
- </div>
-
- {/* Secondary Metrics */}
- <div className='rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <h3 className='mb-4 text-lg font-semibold text-gray-900 dark:text-white'>
- Detailed Metrics
- </h3>
-
- <div className='space-y-3'>
- <div className='flex justify-between'>
- <span className='text-sm text-gray-600 dark:text-gray-400'>
- CAC
- </span>
- <span className='font-semibold text-gray-900 dark:text-white'>
- {formatCurrency(calculated.cac)}
- </span>
- </div>
- <div className='flex justify-between'>
- <span className='text-sm text-gray-600 dark:text-gray-400'>
- CPC
- </span>
- <span className='font-semibold text-gray-900 dark:text-white'>
- {formatCurrency(calculated.cpc)}
- </span>
- </div>
+ {/* Secondary Metrics */}
+ <div className='rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <h3 className='mb-4 text-lg font-semibold text-gray-900 dark:text-white'>
+ Detailed Metrics
+ </h3>
- <div className='flex justify-between'>
- <span className='text-sm text-gray-600 dark:text-gray-400'>
- CPM
- </span>
- <span className='font-semibold text-gray-900 dark:text-white'>
- {formatCurrency(calculated.cpm)}
- </span>
- </div>
+ <div className='space-y-3'>
+ <div className='flex justify-between'>
+ <span className='text-sm text-gray-600 dark:text-gray-400'>
+ CAC
+ </span>
+ <span className='font-semibold text-gray-900 dark:text-white'>
+ {formatCurrency(calculated.cac)}
+ </span>
+ </div>
- <div className='flex justify-between'>
- <span className='text-sm text-gray-600 dark:text-gray-400'>
- CTR
- </span>
- <span className='font-semibold text-gray-900 dark:text-white'>
- {formatPercentage(calculated.ctr)}
- </span>
- </div>
+ <div className='flex justify-between'>
+ <span className='text-sm text-gray-600 dark:text-gray-400'>
+ CPC
+ </span>
+ <span className='font-semibold text-gray-900 dark:text-white'>
+ {formatCurrency(calculated.cpc)}
+ </span>
+ </div>
- <div className='flex justify-between'>
- <span className='text-sm text-gray-600 dark:text-gray-400'>
- Conversion Rate
- </span>
- <span className='font-semibold text-gray-900 dark:text-white'>
- {formatPercentage(calculated.conversionRate)}
- </span>
- </div>
+ <div className='flex justify-between'>
+ <span className='text-sm text-gray-600 dark:text-gray-400'>
+ CPM
+ </span>
+ <span className='font-semibold text-gray-900 dark:text-white'>
+ {formatCurrency(calculated.cpm)}
+ </span>
+ </div>
- <div className='border-t pt-3 dark:border-gray-700'>
<div className='flex justify-between'>
<span className='text-sm text-gray-600 dark:text-gray-400'>
- Break-Even ROAS
+ CTR
</span>
<span className='font-semibold text-gray-900 dark:text-white'>
- {formatRatio(calculated.breakEvenRoas)}
+ {formatPercentage(calculated.ctr)}
</span>
</div>
- <div className='mt-2 flex justify-between'>
+ <div className='flex justify-between'>
<span className='text-sm text-gray-600 dark:text-gray-400'>
- Margin of Safety
+ Conversion Rate
</span>
- <span
- className={`font-semibold ${calculated.marginOfSafety >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400'}`}
- >
- {formatPercentage(calculated.marginOfSafety)}
+ <span className='font-semibold text-gray-900 dark:text-white'>
+ {formatPercentage(calculated.conversionRate)}
</span>
</div>
+
+ <div className='border-t pt-3 dark:border-gray-700'>
+ <div className='flex justify-between'>
+ <span className='text-sm text-gray-600 dark:text-gray-400'>
+ Break-Even ROAS
+ </span>
+ <span className='font-semibold text-gray-900 dark:text-white'>
+ {formatRatio(calculated.breakEvenRoas)}
+ </span>
+ </div>
+
+ <div className='mt-2 flex justify-between'>
+ <span className='text-sm text-gray-600 dark:text-gray-400'>
+ Margin of Safety
+ </span>
+ <span
+ className={`font-semibold ${calculated.marginOfSafety >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400'}`}
+ >
+ {formatPercentage(calculated.marginOfSafety)}
+ </span>
+ </div>
+ </div>
</div>
</div>
- </div>
- {/* Performance Indicator */}
- {metrics.adSpend > 0 ? (
- <div className='rounded-xl bg-gradient-to-r from-indigo-500 to-purple-600 p-6 text-white'>
- <h3 className='mb-2 text-lg font-semibold'>
- Campaign Performance
- </h3>
- <p className='text-sm opacity-90'>
- {calculated.roas >= 4
- ? 'Excellent! Your campaign is highly profitable.'
- : calculated.roas >= 2
- ? 'Good performance. Consider optimization for better results.'
- : calculated.roas >= 1
- ? 'Breaking even. Optimization needed to improve profitability.'
- : 'Campaign is not profitable. Major adjustments required.'}
- </p>
- </div>
- ) : null}
+ {/* Performance Indicator */}
+ {metrics.adSpend > 0 ? (
+ <div className='rounded-xl bg-gradient-to-r from-indigo-500 to-purple-600 p-6 text-white'>
+ <h3 className='mb-2 text-lg font-semibold'>
+ Campaign Performance
+ </h3>
+ <p className='text-sm opacity-90'>
+ {calculated.roas >= 4
+ ? 'Excellent! Your campaign is highly profitable.'
+ : calculated.roas >= 2
+ ? 'Good performance. Consider optimization for better results.'
+ : calculated.roas >= 1
+ ? 'Breaking even. Optimization needed to improve profitability.'
+ : 'Campaign is not profitable. Major adjustments required.'}
+ </p>
+ </div>
+ ) : null}
+ </div>
</div>
</div>
- </div>
- {/* FAQ Section */}
- <div className='mt-16'>
- <h2 className='mb-8 text-center text-3xl font-bold text-gray-900 dark:text-white'>
- Frequently Asked Questions
- </h2>
-
- <div className='space-y-4'>
- {FAQ_ITEMS.map((item, index) => (
- <details
- key={index}
- className='group rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-slate-800'
- >
- <summary className='flex w-full cursor-pointer items-center justify-between px-6 py-4 text-left hover:bg-gray-50 dark:hover:bg-slate-700/50'>
- <h3 className='text-lg font-medium text-gray-900 dark:text-white'>
- {item.question}
- </h3>
- <ChevronDownIcon className='h-5 w-5 text-gray-500 transition-transform group-open:rotate-180' />
- </summary>
- <div className='border-t border-gray-200 px-6 py-4 dark:border-gray-700'>
- <p className='text-gray-600 dark:text-gray-400'>
- {item.answer}
- </p>
- </div>
- </details>
- ))}
+ {/* FAQ Section */}
+ <div className='mt-16'>
+ <h2 className='mb-8 text-center text-3xl font-bold text-gray-900 dark:text-white'>
+ Frequently Asked Questions
+ </h2>
+
+ <div className='space-y-4'>
+ {FAQ_ITEMS.map((item, index) => (
+ <details
+ key={index}
+ className='group rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-slate-800'
+ >
+ <summary className='flex w-full cursor-pointer items-center justify-between px-6 py-4 text-left hover:bg-gray-50 dark:hover:bg-slate-700/50'>
+ <h3 className='text-lg font-medium text-gray-900 dark:text-white'>
+ {item.question}
+ </h3>
+ <ChevronDownIcon className='h-5 w-5 text-gray-500 transition-transform group-open:rotate-180' />
+ </summary>
+ <div className='border-t border-gray-200 px-6 py-4 dark:border-gray-700'>
+ <p className='text-gray-600 dark:text-gray-400'>
+ {item.answer}
+ </p>
+ </div>
+ </details>
+ ))}
+ </div>
</div>
- </div>
- {/* FAQ Structured Data */}
- <script
- type='application/ld+json'
- dangerouslySetInnerHTML={{
- __html: JSON.stringify({
- '@context': 'https://schema.org',
- '@type': 'FAQPage',
- mainEntity: FAQ_ITEMS.map((item) => ({
- '@type': 'Question',
- name: item.question,
- acceptedAnswer: {
- '@type': 'Answer',
- text: item.answer,
- },
- })),
- })
- .replace(/</g, '\\u003c')
- .replace(/\u2028|\u2029/g, ''),
- }}
- />
+ {/* FAQ Structured Data */}
+ <script
+ type='application/ld+json'
+ dangerouslySetInnerHTML={{
+ __html: JSON.stringify({
+ '@context': 'https://schema.org',
+ '@type': 'FAQPage',
+ mainEntity: FAQ_ITEMS.map((item) => ({
+ '@type': 'Question',
+ name: item.question,
+ acceptedAnswer: {
+ '@type': 'Answer',
+ text: item.answer,
+ },
+ })),
+ })
+ .replace(/</g, '\\u003c')
+ .replace(/\u2028|\u2029/g, ''),
+ }}
+ />
<DitchGoogle />
</div>
- <aside className='hidden xl:block xl:w-64 xl:shrink-0 xl:sticky xl:top-12 xl:self-start'>
+ <aside className='hidden xl:sticky xl:top-12 xl:block xl:w-64 xl:shrink-0 xl:self-start'>
<ToolsNav />
</aside>
</div>
diff --git a/web/app/routes/tools.sitemap-validator.tsx b/web/app/routes/tools.sitemap-validator.tsx
index c79ad3e91..087d34444 100644
--- a/web/app/routes/tools.sitemap-validator.tsx
+++ b/web/app/routes/tools.sitemap-validator.tsx
@@ -69,7 +69,10 @@ const VALID_CHANGEFREQ = [
'never',
]
-function extractEncoding(contentType: string | null, xmlContent: string): string {
+function extractEncoding(
+ contentType: string | null,
+ xmlContent: string,
+): string {
if (contentType) {
const match = contentType.match(/charset=([^;]+)/i)
if (match) return match[1].trim().toUpperCase()
@@ -118,7 +121,10 @@ export async function action({ request }: { request: Request }) {
}
let normalizedUrl = sitemapUrl.trim()
- if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) {
+ if (
+ !normalizedUrl.startsWith('http://') &&
+ !normalizedUrl.startsWith('https://')
+ ) {
normalizedUrl = `https://${normalizedUrl}`
}
@@ -173,7 +179,8 @@ export async function action({ request }: { request: Request }) {
issues.push({
type: 'warning',
message: 'Missing XML declaration',
- details: 'Sitemap should start with <?xml version="1.0" encoding="UTF-8"?>',
+ details:
+ 'Sitemap should start with <?xml version="1.0" encoding="UTF-8"?>',
})
}
@@ -197,7 +204,9 @@ export async function action({ request }: { request: Request }) {
urls: [],
sitemapIndex: false,
fetchTime,
- contentLength: contentLength ? parseInt(contentLength, 10) : xmlContent.length,
+ contentLength: contentLength
+ ? parseInt(contentLength, 10)
+ : xmlContent.length,
} as ValidationResult,
}
}
@@ -209,7 +218,8 @@ export async function action({ request }: { request: Request }) {
issues.push({
type: 'error',
message: 'Invalid sitemap root element',
- details: 'Sitemap must have either <urlset> or <sitemapindex> as root element',
+ details:
+ 'Sitemap must have either <urlset> or <sitemapindex> as root element',
})
return {
@@ -223,7 +233,9 @@ export async function action({ request }: { request: Request }) {
urls: [],
sitemapIndex: false,
fetchTime,
- contentLength: contentLength ? parseInt(contentLength, 10) : xmlContent.length,
+ contentLength: contentLength
+ ? parseInt(contentLength, 10)
+ : xmlContent.length,
} as ValidationResult,
}
}
@@ -238,7 +250,8 @@ export async function action({ request }: { request: Request }) {
issues.push({
type: 'error',
message: 'Sitemap index contains no sitemaps',
- details: 'A sitemap index should contain at least one <sitemap> element',
+ details:
+ 'A sitemap index should contain at least one <sitemap> element',
})
}
@@ -249,7 +262,8 @@ export async function action({ request }: { request: Request }) {
issues.push({
type: 'error',
message: `Sitemap #${index + 1} missing <loc> element`,
- details: 'Each sitemap entry must have a <loc> element with the sitemap URL',
+ details:
+ 'Each sitemap entry must have a <loc> element with the sitemap URL',
})
} else {
if (!isValidUrl(loc)) {
@@ -302,8 +316,12 @@ export async function action({ request }: { request: Request }) {
urlElements.forEach((urlElement, index) => {
const loc = urlElement.querySelector('loc')?.textContent?.trim()
const lastmod = urlElement.querySelector('lastmod')?.textContent?.trim()
- const changefreq = urlElement.querySelector('changefreq')?.textContent?.trim()
- const priority = urlElement.querySelector('priority')?.textContent?.trim()
+ const changefreq = urlElement
+ .querySelector('changefreq')
+ ?.textContent?.trim()
+ const priority = urlElement
+ .querySelector('priority')
+ ?.textContent?.trim()
if (!loc) {
issues.push({
@@ -333,7 +351,8 @@ export async function action({ request }: { request: Request }) {
}
if (lastmod) {
- const isoDateRegex = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}([+-]\d{2}:\d{2}|Z)?)?$/
+ const isoDateRegex =
+ /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}([+-]\d{2}:\d{2}|Z)?)?$/
if (!isoDateRegex.test(lastmod)) {
issues.push({
type: 'warning',
@@ -343,7 +362,10 @@ export async function action({ request }: { request: Request }) {
}
}
- if (changefreq && !VALID_CHANGEFREQ.includes(changefreq.toLowerCase())) {
+ if (
+ changefreq &&
+ !VALID_CHANGEFREQ.includes(changefreq.toLowerCase())
+ ) {
issues.push({
type: 'warning',
message: `Invalid changefreq value at URL #${index + 1}`,
@@ -376,7 +398,9 @@ export async function action({ request }: { request: Request }) {
}
}
- const fileSizeBytes = contentLength ? parseInt(contentLength, 10) : xmlContent.length
+ const fileSizeBytes = contentLength
+ ? parseInt(contentLength, 10)
+ : xmlContent.length
const fileSizeMB = fileSizeBytes / (1024 * 1024)
if (fileSizeMB > 50) {
@@ -477,7 +501,7 @@ const FAQ_ITEMS = [
{
question: 'How do I submit my sitemap to search engines?',
answer:
- 'You can submit your sitemap through each search engine\'s webmaster tools: Google Search Console, Bing Webmaster Tools, etc. You can also add a Sitemap directive in your robots.txt file (Sitemap: https://example.com/sitemap.xml) to help search engines discover it automatically.',
+ "You can submit your sitemap through each search engine's webmaster tools: Google Search Console, Bing Webmaster Tools, etc. You can also add a Sitemap directive in your robots.txt file (Sitemap: https://example.com/sitemap.xml) to help search engines discover it automatically.",
},
{
question: 'Should my sitemap use HTTPS?',
@@ -496,9 +520,13 @@ function IssueIcon({ type }: { type: 'error' | 'warning' | 'info' }) {
case 'error':
return <XCircleIcon className='h-5 w-5 shrink-0 text-red-500' />
case 'warning':
- return <ExclamationTriangleIcon className='h-5 w-5 shrink-0 text-amber-500' />
+ return (
+ <ExclamationTriangleIcon className='h-5 w-5 shrink-0 text-amber-500' />
+ )
case 'info':
- return <InformationCircleIcon className='h-5 w-5 shrink-0 text-blue-500' />
+ return (
+ <InformationCircleIcon className='h-5 w-5 shrink-0 text-blue-500' />
+ )
}
}
@@ -534,7 +562,8 @@ export default function SitemapValidator() {
const [urlInput, setUrlInput] = useState('')
const [inputError, setInputError] = useState<string | null>(null)
- const isLoading = fetcher.state === 'submitting' || fetcher.state === 'loading'
+ const isLoading =
+ fetcher.state === 'submitting' || fetcher.state === 'loading'
const result = fetcher.data?.result
const apiError = fetcher.data?.error
@@ -559,8 +588,10 @@ export default function SitemapValidator() {
const displayError = inputError || apiError
- const errorCount = result?.issues.filter((i) => i.type === 'error').length || 0
- const warningCount = result?.issues.filter((i) => i.type === 'warning').length || 0
+ const errorCount =
+ result?.issues.filter((i) => i.type === 'error').length || 0
+ const warningCount =
+ result?.issues.filter((i) => i.type === 'warning').length || 0
const infoCount = result?.issues.filter((i) => i.type === 'info').length || 0
const formatBytes = (bytes: number) => {
@@ -584,416 +615,430 @@ export default function SitemapValidator() {
practices.
</Text>
- <div className='mt-10'>
- <form onSubmit={handleSubmit} className='flex items-start gap-3'>
- <Input
- type='text'
- placeholder='https://example.com/sitemap.xml'
- value={urlInput}
- onChange={handleInputChange}
- error={displayError}
- className='flex-1'
- />
- <Button
- type='submit'
- primary
- regular
- disabled={isLoading}
- className='mt-px'
- >
- {isLoading ? (
- <Spin className='h-4 w-4' />
- ) : (
- <>
- <MagnifyingGlassIcon className='mr-1.5 h-4 w-4' />
- Validate
- </>
- )}
- </Button>
- </form>
- </div>
-
- {result && (
- <div className='mt-8 space-y-6'>
- <section className='overflow-hidden rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <div className='mb-6 flex items-center gap-4'>
- {result.isValid ? (
- <div className='flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30'>
- <CheckCircleIcon className='h-7 w-7 text-emerald-600 dark:text-emerald-400' />
- </div>
+ <div className='mt-10'>
+ <form onSubmit={handleSubmit} className='flex items-start gap-3'>
+ <Input
+ type='text'
+ placeholder='https://example.com/sitemap.xml'
+ value={urlInput}
+ onChange={handleInputChange}
+ error={displayError}
+ className='flex-1'
+ />
+ <Button
+ type='submit'
+ primary
+ regular
+ disabled={isLoading}
+ className='mt-px'
+ >
+ {isLoading ? (
+ <Spin className='h-4 w-4' />
) : (
- <div className='flex h-12 w-12 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30'>
- <XCircleIcon className='h-7 w-7 text-red-600 dark:text-red-400' />
- </div>
+ <>
+ <MagnifyingGlassIcon className='mr-1.5 h-4 w-4' />
+ Validate
+ </>
)}
- <div>
- <Text as='h2' size='xl' weight='semibold'>
- {result.isValid ? 'Sitemap is Valid' : 'Sitemap Has Errors'}
- </Text>
- <Text colour='muted' className='break-all'>
- {result.url}
- </Text>
+ </Button>
+ </form>
+ </div>
+
+ {result && (
+ <div className='mt-8 space-y-6'>
+ <section className='overflow-hidden rounded-xl bg-white p-6 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <div className='mb-6 flex items-center gap-4'>
+ {result.isValid ? (
+ <div className='flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30'>
+ <CheckCircleIcon className='h-7 w-7 text-emerald-600 dark:text-emerald-400' />
+ </div>
+ ) : (
+ <div className='flex h-12 w-12 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30'>
+ <XCircleIcon className='h-7 w-7 text-red-600 dark:text-red-400' />
+ </div>
+ )}
+ <div>
+ <Text as='h2' size='xl' weight='semibold'>
+ {result.isValid
+ ? 'Sitemap is Valid'
+ : 'Sitemap Has Errors'}
+ </Text>
+ <Text colour='muted' className='break-all'>
+ {result.url}
+ </Text>
+ </div>
</div>
- </div>
- <div className='mb-6 grid grid-cols-2 gap-4 sm:grid-cols-4'>
- <StatCard
- label={result.sitemapIndex ? 'Sitemaps' : 'URLs'}
- value={result.sitemapIndex ? result.sitemaps?.length || 0 : result.urlCount}
- />
- <StatCard label='Encoding' value={result.encoding || 'Unknown'} />
- <StatCard
- label='File Size'
- value={result.contentLength ? formatBytes(result.contentLength) : 'Unknown'}
- />
- <StatCard
- label='Fetch Time'
- value={`${result.fetchTime}ms`}
- />
- </div>
+ <div className='mb-6 grid grid-cols-2 gap-4 sm:grid-cols-4'>
+ <StatCard
+ label={result.sitemapIndex ? 'Sitemaps' : 'URLs'}
+ value={
+ result.sitemapIndex
+ ? result.sitemaps?.length || 0
+ : result.urlCount
+ }
+ />
+ <StatCard
+ label='Encoding'
+ value={result.encoding || 'Unknown'}
+ />
+ <StatCard
+ label='File Size'
+ value={
+ result.contentLength
+ ? formatBytes(result.contentLength)
+ : 'Unknown'
+ }
+ />
+ <StatCard
+ label='Fetch Time'
+ value={`${result.fetchTime}ms`}
+ />
+ </div>
- {result.issues.length > 0 && (
- <div>
- <div className='mb-3 flex flex-wrap items-center gap-4'>
- <Text weight='medium'>Validation Results</Text>
- <div className='flex gap-3 text-sm'>
- {errorCount > 0 && (
- <span className='flex items-center gap-1 text-red-600 dark:text-red-400'>
- <XCircleIcon className='h-4 w-4' />
- {errorCount} error{errorCount !== 1 ? 's' : ''}
- </span>
- )}
- {warningCount > 0 && (
- <span className='flex items-center gap-1 text-amber-600 dark:text-amber-400'>
- <ExclamationTriangleIcon className='h-4 w-4' />
- {warningCount} warning{warningCount !== 1 ? 's' : ''}
- </span>
- )}
- {infoCount > 0 && (
- <span className='flex items-center gap-1 text-blue-600 dark:text-blue-400'>
- <InformationCircleIcon className='h-4 w-4' />
- {infoCount} info
- </span>
- )}
+ {result.issues.length > 0 && (
+ <div>
+ <div className='mb-3 flex flex-wrap items-center gap-4'>
+ <Text weight='medium'>Validation Results</Text>
+ <div className='flex gap-3 text-sm'>
+ {errorCount > 0 && (
+ <span className='flex items-center gap-1 text-red-600 dark:text-red-400'>
+ <XCircleIcon className='h-4 w-4' />
+ {errorCount} error{errorCount !== 1 ? 's' : ''}
+ </span>
+ )}
+ {warningCount > 0 && (
+ <span className='flex items-center gap-1 text-amber-600 dark:text-amber-400'>
+ <ExclamationTriangleIcon className='h-4 w-4' />
+ {warningCount} warning
+ {warningCount !== 1 ? 's' : ''}
+ </span>
+ )}
+ {infoCount > 0 && (
+ <span className='flex items-center gap-1 text-blue-600 dark:text-blue-400'>
+ <InformationCircleIcon className='h-4 w-4' />
+ {infoCount} info
+ </span>
+ )}
+ </div>
</div>
- </div>
- <div className='space-y-2'>
- {result.issues.map((issue, index) => (
- <div
- key={index}
- className={`flex gap-3 rounded-lg p-3 ${
- issue.type === 'error'
- ? 'bg-red-50 dark:bg-red-900/20'
- : issue.type === 'warning'
- ? 'bg-amber-50 dark:bg-amber-900/20'
- : 'bg-blue-50 dark:bg-blue-900/20'
- }`}
- >
- <IssueIcon type={issue.type} />
- <div className='min-w-0 flex-1'>
- <Text weight='medium' className='text-sm'>
- {issue.message}
- </Text>
- {issue.details && (
- <Text
- size='sm'
- colour='muted'
- className='mt-0.5 break-all'
- >
- {issue.details}
+ <div className='space-y-2'>
+ {result.issues.map((issue, index) => (
+ <div
+ key={index}
+ className={`flex gap-3 rounded-lg p-3 ${
+ issue.type === 'error'
+ ? 'bg-red-50 dark:bg-red-900/20'
+ : issue.type === 'warning'
+ ? 'bg-amber-50 dark:bg-amber-900/20'
+ : 'bg-blue-50 dark:bg-blue-900/20'
+ }`}
+ >
+ <IssueIcon type={issue.type} />
+ <div className='min-w-0 flex-1'>
+ <Text weight='medium' className='text-sm'>
+ {issue.message}
</Text>
- )}
+ {issue.details && (
+ <Text
+ size='sm'
+ colour='muted'
+ className='mt-0.5 break-all'
+ >
+ {issue.details}
+ </Text>
+ )}
+ </div>
</div>
- </div>
- ))}
- </div>
- </div>
- )}
- </section>
-
- {result.urls.length > 0 && (
- <section className='overflow-hidden rounded-xl bg-white ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <div className='border-b border-gray-200 px-6 py-4 dark:border-slate-700'>
- <Text weight='medium'>
- URL Preview ({result.urls.length} of {result.urlCount})
- </Text>
- </div>
- <div className='max-h-96 overflow-y-auto'>
- <table className='w-full text-left text-sm'>
- <thead className='sticky top-0 bg-gray-50 dark:bg-slate-700'>
- <tr>
- <th className='px-4 py-2 font-medium'>URL</th>
- <th className='hidden px-4 py-2 font-medium sm:table-cell'>
- Last Modified
- </th>
- <th className='hidden px-4 py-2 font-medium md:table-cell'>
- Priority
- </th>
- </tr>
- </thead>
- <tbody className='divide-y divide-gray-100 dark:divide-slate-700'>
- {result.urls.map((url, index) => (
- <tr key={index}>
- <td className='max-w-xs truncate px-4 py-2'>
- <a
- href={url.loc}
- target='_blank'
- rel='noopener noreferrer'
- className='text-indigo-600 hover:underline dark:text-indigo-400'
- >
- {url.loc}
- </a>
- </td>
- <td className='hidden px-4 py-2 text-gray-500 sm:table-cell dark:text-gray-400'>
- {url.lastmod || '—'}
- </td>
- <td className='hidden px-4 py-2 text-gray-500 md:table-cell dark:text-gray-400'>
- {url.priority || '—'}
- </td>
- </tr>
))}
- </tbody>
- </table>
- </div>
- </section>
- )}
-
- {result.sitemaps && result.sitemaps.length > 0 && (
- <section className='overflow-hidden rounded-xl bg-white ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <div className='border-b border-gray-200 px-6 py-4 dark:border-slate-700'>
- <Text weight='medium'>
- Referenced Sitemaps ({result.sitemaps.length})
- </Text>
- </div>
- <div className='max-h-64 overflow-y-auto'>
- <ul className='divide-y divide-gray-100 dark:divide-slate-700'>
- {result.sitemaps.map((sitemap, index) => (
- <li key={index} className='px-4 py-3'>
- <a
- href={sitemap}
- target='_blank'
- rel='noopener noreferrer'
- className='break-all text-sm text-indigo-600 hover:underline dark:text-indigo-400'
- >
- {sitemap}
- </a>
- </li>
- ))}
- </ul>
- </div>
+ </div>
+ </div>
+ )}
</section>
- )}
- </div>
- )}
- <section className='mt-20 border-t border-gray-200 pt-16 dark:border-slate-700'>
- <Text as='h2' size='3xl' weight='bold' tracking='tight'>
- Free XML Sitemap Validator Tool
- </Text>
- <Text
- as='p'
- size='lg'
- colour='muted'
- className='mt-4 leading-relaxed'
- >
- Our free sitemap validator checks your sitemap.xml file for
- compliance with the sitemap protocol, identifies errors and
- warnings, and helps ensure search engines can properly crawl and
- index your website. Simply enter your sitemap URL to get instant
- validation results with detailed feedback.
- </Text>
+ {result.urls.length > 0 && (
+ <section className='overflow-hidden rounded-xl bg-white ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <div className='border-b border-gray-200 px-6 py-4 dark:border-slate-700'>
+ <Text weight='medium'>
+ URL Preview ({result.urls.length} of {result.urlCount})
+ </Text>
+ </div>
+ <div className='max-h-96 overflow-y-auto'>
+ <table className='w-full text-left text-sm'>
+ <thead className='sticky top-0 bg-gray-50 dark:bg-slate-700'>
+ <tr>
+ <th className='px-4 py-2 font-medium'>URL</th>
+ <th className='hidden px-4 py-2 font-medium sm:table-cell'>
+ Last Modified
+ </th>
+ <th className='hidden px-4 py-2 font-medium md:table-cell'>
+ Priority
+ </th>
+ </tr>
+ </thead>
+ <tbody className='divide-y divide-gray-100 dark:divide-slate-700'>
+ {result.urls.map((url, index) => (
+ <tr key={index}>
+ <td className='max-w-xs truncate px-4 py-2'>
+ <a
+ href={url.loc}
+ target='_blank'
+ rel='noopener noreferrer'
+ className='text-indigo-600 hover:underline dark:text-indigo-400'
+ >
+ {url.loc}
+ </a>
+ </td>
+ <td className='hidden px-4 py-2 text-gray-500 sm:table-cell dark:text-gray-400'>
+ {url.lastmod || '—'}
+ </td>
+ <td className='hidden px-4 py-2 text-gray-500 md:table-cell dark:text-gray-400'>
+ {url.priority || '—'}
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ </section>
+ )}
- <div className='mt-12 grid gap-x-12 gap-y-10 md:grid-cols-2'>
- <div>
- <Text as='h3' size='xl' weight='semibold'>
- What This Validator Checks
- </Text>
- <ul className='mt-3 space-y-2'>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- XML Structure
- </Text>{' '}
- - Validates that your sitemap is well-formed XML
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Character Encoding
- </Text>{' '}
- - Detects and verifies UTF-8 or other encodings
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Required Tags
- </Text>{' '}
- - Checks for urlset, url, and loc elements
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- URL Validation
- </Text>{' '}
- - Verifies all URLs are properly formatted
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Duplicate Detection
- </Text>{' '}
- - Identifies duplicate URL entries
- </Text>
- </li>
- </ul>
+ {result.sitemaps && result.sitemaps.length > 0 && (
+ <section className='overflow-hidden rounded-xl bg-white ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <div className='border-b border-gray-200 px-6 py-4 dark:border-slate-700'>
+ <Text weight='medium'>
+ Referenced Sitemaps ({result.sitemaps.length})
+ </Text>
+ </div>
+ <div className='max-h-64 overflow-y-auto'>
+ <ul className='divide-y divide-gray-100 dark:divide-slate-700'>
+ {result.sitemaps.map((sitemap, index) => (
+ <li key={index} className='px-4 py-3'>
+ <a
+ href={sitemap}
+ target='_blank'
+ rel='noopener noreferrer'
+ className='text-sm break-all text-indigo-600 hover:underline dark:text-indigo-400'
+ >
+ {sitemap}
+ </a>
+ </li>
+ ))}
+ </ul>
+ </div>
+ </section>
+ )}
</div>
+ )}
- <div>
- <Text as='h3' size='xl' weight='semibold'>
- Additional Validations
- </Text>
- <ul className='mt-3 space-y-2'>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Date Formats
- </Text>{' '}
- - Validates lastmod dates use W3C format
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Priority Values
- </Text>{' '}
- - Checks priority is between 0.0 and 1.0
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Change Frequency
- </Text>{' '}
- - Verifies changefreq uses valid values
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Size Limits
- </Text>{' '}
- - Warns about file size and URL count limits
- </Text>
- </li>
- <li>
- <Text colour='muted'>
- <Text as='span' weight='semibold' colour='inherit'>
- Sitemap Index
- </Text>{' '}
- - Supports validation of sitemap index files
- </Text>
- </li>
- </ul>
- </div>
+ <section className='mt-20 border-t border-gray-200 pt-16 dark:border-slate-700'>
+ <Text as='h2' size='3xl' weight='bold' tracking='tight'>
+ Free XML Sitemap Validator Tool
+ </Text>
+ <Text
+ as='p'
+ size='lg'
+ colour='muted'
+ className='mt-4 leading-relaxed'
+ >
+ Our free sitemap validator checks your sitemap.xml file for
+ compliance with the sitemap protocol, identifies errors and
+ warnings, and helps ensure search engines can properly crawl and
+ index your website. Simply enter your sitemap URL to get instant
+ validation results with detailed feedback.
+ </Text>
- <div>
- <Text as='h3' size='xl' weight='semibold'>
- Why Sitemaps Matter for SEO
- </Text>
- <Text as='p' colour='muted' className='mt-3'>
- A properly formatted sitemap helps search engines discover all
- the important pages on your website. It's especially valuable
- for new websites, sites with deep page hierarchies, or pages
- that aren't well linked internally. Search engines use
- sitemaps to understand your site structure and prioritize
- crawling.
- </Text>
+ <div className='mt-12 grid gap-x-12 gap-y-10 md:grid-cols-2'>
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ What This Validator Checks
+ </Text>
+ <ul className='mt-3 space-y-2'>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ XML Structure
+ </Text>{' '}
+ - Validates that your sitemap is well-formed XML
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Character Encoding
+ </Text>{' '}
+ - Detects and verifies UTF-8 or other encodings
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Required Tags
+ </Text>{' '}
+ - Checks for urlset, url, and loc elements
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ URL Validation
+ </Text>{' '}
+ - Verifies all URLs are properly formatted
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Duplicate Detection
+ </Text>{' '}
+ - Identifies duplicate URL entries
+ </Text>
+ </li>
+ </ul>
+ </div>
+
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ Additional Validations
+ </Text>
+ <ul className='mt-3 space-y-2'>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Date Formats
+ </Text>{' '}
+ - Validates lastmod dates use W3C format
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Priority Values
+ </Text>{' '}
+ - Checks priority is between 0.0 and 1.0
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Change Frequency
+ </Text>{' '}
+ - Verifies changefreq uses valid values
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Size Limits
+ </Text>{' '}
+ - Warns about file size and URL count limits
+ </Text>
+ </li>
+ <li>
+ <Text colour='muted'>
+ <Text as='span' weight='semibold' colour='inherit'>
+ Sitemap Index
+ </Text>{' '}
+ - Supports validation of sitemap index files
+ </Text>
+ </li>
+ </ul>
+ </div>
+
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ Why Sitemaps Matter for SEO
+ </Text>
+ <Text as='p' colour='muted' className='mt-3'>
+ A properly formatted sitemap helps search engines discover
+ all the important pages on your website. It's especially
+ valuable for new websites, sites with deep page hierarchies,
+ or pages that aren't well linked internally. Search engines
+ use sitemaps to understand your site structure and
+ prioritize crawling.
+ </Text>
+ </div>
+
+ <div>
+ <Text as='h3' size='xl' weight='semibold'>
+ Best Practices for Sitemaps
+ </Text>
+ <Text as='p' colour='muted' className='mt-3'>
+ Keep your sitemap updated whenever you add or remove pages.
+ Only include canonical URLs that return 200 status codes.
+ Split large sitemaps into multiple files using a sitemap
+ index. Submit your sitemap to Google Search Console and Bing
+ Webmaster Tools for faster indexing.
+ </Text>
+ </div>
</div>
- <div>
+ <div className='mt-12'>
<Text as='h3' size='xl' weight='semibold'>
- Best Practices for Sitemaps
+ How to Use This Sitemap Checker
</Text>
<Text as='p' colour='muted' className='mt-3'>
- Keep your sitemap updated whenever you add or remove pages.
- Only include canonical URLs that return 200 status codes.
- Split large sitemaps into multiple files using a sitemap
- index. Submit your sitemap to Google Search Console and Bing
- Webmaster Tools for faster indexing.
+ Enter your sitemap URL in the input field above (e.g.,
+ https://example.com/sitemap.xml) and click "Validate." The
+ tool will fetch your sitemap, parse the XML, and display
+ detailed validation results including any errors, warnings,
+ and informational messages. You'll see statistics about your
+ sitemap, a preview of the URLs it contains, and specific
+ guidance on how to fix any issues found.
</Text>
</div>
- </div>
+ </section>
- <div className='mt-12'>
- <Text as='h3' size='xl' weight='semibold'>
- How to Use This Sitemap Checker
+ <section className='mt-16'>
+ <Text as='h2' size='2xl' weight='bold' className='mb-6'>
+ FAQ
</Text>
- <Text as='p' colour='muted' className='mt-3'>
- Enter your sitemap URL in the input field above (e.g.,
- https://example.com/sitemap.xml) and click "Validate." The tool
- will fetch your sitemap, parse the XML, and display detailed
- validation results including any errors, warnings, and
- informational messages. You'll see statistics about your
- sitemap, a preview of the URLs it contains, and specific
- guidance on how to fix any issues found.
- </Text>
- </div>
- </section>
- <section className='mt-16'>
- <Text as='h2' size='2xl' weight='bold' className='mb-6'>
- FAQ
- </Text>
-
- <div className='space-y-3'>
- {FAQ_ITEMS.map((item, index) => (
- <details
- key={index}
- className='group rounded-lg border border-gray-200 bg-white dark:border-slate-700 dark:bg-slate-800'
- >
- <summary className='flex cursor-pointer items-center justify-between px-5 py-4 text-left'>
- <Text weight='medium'>{item.question}</Text>
- <ChevronDownIcon className='h-5 w-5 shrink-0 text-gray-400 transition-transform group-open:rotate-180' />
- </summary>
- <div className='border-t border-gray-200 px-5 py-4 dark:border-slate-700'>
- <Text as='p' colour='muted'>
- {item.answer}
- </Text>
- </div>
- </details>
- ))}
- </div>
- </section>
-
- <script
- type='application/ld+json'
- dangerouslySetInnerHTML={{
- __html: JSON.stringify({
- '@context': 'https://schema.org',
- '@type': 'FAQPage',
- mainEntity: FAQ_ITEMS.map((item) => ({
- '@type': 'Question',
- name: item.question,
- acceptedAnswer: {
- '@type': 'Answer',
- text: item.answer,
- },
- })),
- })
- .replace(/</g, '\\u003c')
- .replace(/\u2028|\u2029/g, ''),
- }}
- />
+ <div className='space-y-3'>
+ {FAQ_ITEMS.map((item, index) => (
+ <details
+ key={index}
+ className='group rounded-lg border border-gray-200 bg-white dark:border-slate-700 dark:bg-slate-800'
+ >
+ <summary className='flex cursor-pointer items-center justify-between px-5 py-4 text-left'>
+ <Text weight='medium'>{item.question}</Text>
+ <ChevronDownIcon className='h-5 w-5 shrink-0 text-gray-400 transition-transform group-open:rotate-180' />
+ </summary>
+ <div className='border-t border-gray-200 px-5 py-4 dark:border-slate-700'>
+ <Text as='p' colour='muted'>
+ {item.answer}
+ </Text>
+ </div>
+ </details>
+ ))}
+ </div>
+ </section>
+
+ <script
+ type='application/ld+json'
+ dangerouslySetInnerHTML={{
+ __html: JSON.stringify({
+ '@context': 'https://schema.org',
+ '@type': 'FAQPage',
+ mainEntity: FAQ_ITEMS.map((item) => ({
+ '@type': 'Question',
+ name: item.question,
+ acceptedAnswer: {
+ '@type': 'Answer',
+ text: item.answer,
+ },
+ })),
+ })
+ .replace(/</g, '\\u003c')
+ .replace(/\u2028|\u2029/g, ''),
+ }}
+ />
<DitchGoogle />
</div>
- <aside className='hidden lg:block lg:w-64 lg:shrink-0 lg:sticky lg:top-12 lg:self-start'>
+ <aside className='hidden lg:sticky lg:top-12 lg:block lg:w-64 lg:shrink-0 lg:self-start'>
<ToolsNav />
</aside>
</div>
diff --git a/web/app/routes/tools.utm-generator.tsx b/web/app/routes/tools.utm-generator.tsx
index 5dc02becd..e4e669fbc 100644
--- a/web/app/routes/tools.utm-generator.tsx
+++ b/web/app/routes/tools.utm-generator.tsx
@@ -205,226 +205,231 @@ export default function UTMGenerator() {
marketing campaigns effectively
</Text>
- <div className='mt-12 rounded-xl bg-white p-8 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
- <div className='space-y-6'>
- <div>
- <h2 className='mb-6 text-2xl font-semibold text-gray-900 dark:text-white'>
- Build your UTM link
- </h2>
-
- <div className='space-y-6'>
- <Input
- type='text'
- placeholder='https://example.com/page'
- label='Your URL address'
- value={params.url}
- onChange={(e) => handleParamChange('url', e.target.value)}
- className='w-full'
- />
-
- <div className='grid gap-6 md:grid-cols-2'>
- <div>
- <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
- Campaign parameters
- </h3>
-
- <div className='space-y-4'>
- <div>
- <Input
- type='text'
- placeholder={sourceExamples.join(', ')}
- label={
- <>
- Campaign source
- <Tooltip
- className='ml-1'
- text='Identifies the source of your traffic (e.g., google, facebook, newsletter)'
- />
- </>
- }
- value={params.utm_source}
- onChange={(e) =>
- handleParamChange('utm_source', e.target.value)
- }
- className='w-full'
- />
- </div>
-
- <div>
- <Input
- type='text'
- placeholder={mediumExamples.join(', ')}
- label={
- <>
- Campaign medium
- <Tooltip
- className='ml-1'
- text='Identifies the marketing medium (e.g., email, cpc, social, referral)'
- />
- </>
- }
- value={params.utm_medium}
- onChange={(e) =>
- handleParamChange('utm_medium', e.target.value)
- }
- className='w-full'
- />
- </div>
-
- <div>
- <Input
- type='text'
- placeholder={campaignExamples.join(', ')}
- label={
- <>
- Campaign name
- <Tooltip
- className='ml-1'
- text='Identifies a specific campaign (e.g., spring_sale, product_launch)'
- />
- </>
- }
- value={params.utm_campaign}
- onChange={(e) =>
- handleParamChange('utm_campaign', e.target.value)
- }
- className='w-full'
- />
+ <div className='mt-12 rounded-xl bg-white p-8 ring-1 ring-gray-200 dark:bg-slate-800 dark:ring-slate-700'>
+ <div className='space-y-6'>
+ <div>
+ <h2 className='mb-6 text-2xl font-semibold text-gray-900 dark:text-white'>
+ Build your UTM link
+ </h2>
+
+ <div className='space-y-6'>
+ <Input
+ type='text'
+ placeholder='https://example.com/page'
+ label='Your URL address'
+ value={params.url}
+ onChange={(e) => handleParamChange('url', e.target.value)}
+ className='w-full'
+ />
+
+ <div className='grid gap-6 md:grid-cols-2'>
+ <div>
+ <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
+ Campaign parameters
+ </h3>
+
+ <div className='space-y-4'>
+ <div>
+ <Input
+ type='text'
+ placeholder={sourceExamples.join(', ')}
+ label={
+ <>
+ Campaign source
+ <Tooltip
+ className='ml-1'
+ text='Identifies the source of your traffic (e.g., google, facebook, newsletter)'
+ />
+ </>
+ }
+ value={params.utm_source}
+ onChange={(e) =>
+ handleParamChange('utm_source', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
+
+ <div>
+ <Input
+ type='text'
+ placeholder={mediumExamples.join(', ')}
+ label={
+ <>
+ Campaign medium
+ <Tooltip
+ className='ml-1'
+ text='Identifies the marketing medium (e.g., email, cpc, social, referral)'
+ />
+ </>
+ }
+ value={params.utm_medium}
+ onChange={(e) =>
+ handleParamChange('utm_medium', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
+
+ <div>
+ <Input
+ type='text'
+ placeholder={campaignExamples.join(', ')}
+ label={
+ <>
+ Campaign name
+ <Tooltip
+ className='ml-1'
+ text='Identifies a specific campaign (e.g., spring_sale, product_launch)'
+ />
+ </>
+ }
+ value={params.utm_campaign}
+ onChange={(e) =>
+ handleParamChange(
+ 'utm_campaign',
+ e.target.value,
+ )
+ }
+ className='w-full'
+ />
+ </div>
</div>
</div>
- </div>
-
- <div>
- <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
- Optional parameters
- </h3>
-
- <div className='space-y-4'>
- <div>
- <Input
- type='text'
- placeholder='link, landing page'
- label={
- <>
- Campaign content
- <Tooltip
- className='ml-1'
- text='Used to differentiate similar content or links within the same ad'
- />
- </>
- }
- value={params.utm_content}
- onChange={(e) =>
- handleParamChange('utm_content', e.target.value)
- }
- className='w-full'
- />
- </div>
- <div>
- <Input
- type='text'
- placeholder='free, -30%, registration'
- value={params.utm_term}
- label={
- <>
- Campaign term
- <Tooltip
- className='ml-1'
- text='Used for paid search to identify keywords for your ad'
- />
- </>
- }
- onChange={(e) =>
- handleParamChange('utm_term', e.target.value)
- }
- className='w-full'
- />
+ <div>
+ <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
+ Optional parameters
+ </h3>
+
+ <div className='space-y-4'>
+ <div>
+ <Input
+ type='text'
+ placeholder='link, landing page'
+ label={
+ <>
+ Campaign content
+ <Tooltip
+ className='ml-1'
+ text='Used to differentiate similar content or links within the same ad'
+ />
+ </>
+ }
+ value={params.utm_content}
+ onChange={(e) =>
+ handleParamChange('utm_content', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
+
+ <div>
+ <Input
+ type='text'
+ placeholder='free, -30%, registration'
+ value={params.utm_term}
+ label={
+ <>
+ Campaign term
+ <Tooltip
+ className='ml-1'
+ text='Used for paid search to identify keywords for your ad'
+ />
+ </>
+ }
+ onChange={(e) =>
+ handleParamChange('utm_term', e.target.value)
+ }
+ className='w-full'
+ />
+ </div>
</div>
</div>
</div>
</div>
</div>
- </div>
- <div className='border-t border-gray-200 pt-6 dark:border-gray-700'>
- <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
- Result
- </h3>
- <div className='flex flex-col items-center gap-2 md:flex-row'>
- <Input
- type='text'
- value={generatedURL || 'Your UTM link will appear here...'}
- readOnly
- className='w-full font-mono text-sm tracking-tight'
- disabled={!generatedURL}
- />
- <Button
- onClick={copyToClipboard}
- disabled={!generatedURL}
- primary
- regular
- >
- <CopyIcon className='mr-1 h-4 w-4' />
- {copied ? 'Copied!' : 'Copy'}
- </Button>
+ <div className='border-t border-gray-200 pt-6 dark:border-gray-700'>
+ <h3 className='mb-4 text-lg font-medium text-gray-900 dark:text-white'>
+ Result
+ </h3>
+ <div className='flex flex-col items-center gap-2 md:flex-row'>
+ <Input
+ type='text'
+ value={
+ generatedURL || 'Your UTM link will appear here...'
+ }
+ readOnly
+ className='w-full font-mono text-sm tracking-tight'
+ disabled={!generatedURL}
+ />
+ <Button
+ onClick={copyToClipboard}
+ disabled={!generatedURL}
+ primary
+ regular
+ >
+ <CopyIcon className='mr-1 h-4 w-4' />
+ {copied ? 'Copied!' : 'Copy'}
+ </Button>
+ </div>
</div>
</div>
</div>
- </div>
- <div className='mt-16'>
- <h2 className='mb-8 text-center text-3xl font-bold text-gray-900 dark:text-white'>
- Frequently Asked Questions
- </h2>
-
- <div className='space-y-4'>
- {FAQ_ITEMS.map((item, index) => (
- <details
- key={index}
- className='group rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-slate-800'
- >
- <summary className='flex w-full cursor-pointer items-center justify-between px-6 py-4 text-left hover:bg-gray-50 dark:hover:bg-slate-700/50'>
- <h3 className='text-lg font-medium text-gray-900 dark:text-white'>
- {item.question}
- </h3>
- <ChevronDownIcon className='h-5 w-5 text-gray-500 transition-transform group-open:rotate-180' />
- </summary>
- <div className='border-t border-gray-200 px-6 py-4 dark:border-gray-700'>
- <p className='text-gray-600 dark:text-gray-400'>
- {item.answer}
- </p>
- </div>
- </details>
- ))}
+ <div className='mt-16'>
+ <h2 className='mb-8 text-center text-3xl font-bold text-gray-900 dark:text-white'>
+ Frequently Asked Questions
+ </h2>
+
+ <div className='space-y-4'>
+ {FAQ_ITEMS.map((item, index) => (
+ <details
+ key={index}
+ className='group rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-slate-800'
+ >
+ <summary className='flex w-full cursor-pointer items-center justify-between px-6 py-4 text-left hover:bg-gray-50 dark:hover:bg-slate-700/50'>
+ <h3 className='text-lg font-medium text-gray-900 dark:text-white'>
+ {item.question}
+ </h3>
+ <ChevronDownIcon className='h-5 w-5 text-gray-500 transition-transform group-open:rotate-180' />
+ </summary>
+ <div className='border-t border-gray-200 px-6 py-4 dark:border-gray-700'>
+ <p className='text-gray-600 dark:text-gray-400'>
+ {item.answer}
+ </p>
+ </div>
+ </details>
+ ))}
+ </div>
</div>
- </div>
- {/* FAQ Structured Data */}
- <script
- type='application/ld+json'
- dangerouslySetInnerHTML={{
- __html: JSON.stringify({
- '@context': 'https://schema.org',
- '@type': 'FAQPage',
- mainEntity: FAQ_ITEMS.map((item) => ({
- '@type': 'Question',
- name: item.question,
- acceptedAnswer: {
- '@type': 'Answer',
- text: item.answer,
- },
- })),
- })
- .replace(/</g, '\\u003c')
- .replace(/\u2028|\u2029/g, ''),
- }}
- />
+ {/* FAQ Structured Data */}
+ <script
+ type='application/ld+json'
+ dangerouslySetInnerHTML={{
+ __html: JSON.stringify({
+ '@context': 'https://schema.org',
+ '@type': 'FAQPage',
+ mainEntity: FAQ_ITEMS.map((item) => ({
+ '@type': 'Question',
+ name: item.question,
+ acceptedAnswer: {
+ '@type': 'Answer',
+ text: item.answer,
+ },
+ })),
+ })
+ .replace(/</g, '\\u003c')
+ .replace(/\u2028|\u2029/g, ''),
+ }}
+ />
<DitchGoogle />
</div>
- <aside className='hidden lg:block lg:w-64 lg:shrink-0 lg:sticky lg:top-12 lg:self-start'>
+ <aside className='hidden lg:sticky lg:top-12 lg:block lg:w-64 lg:shrink-0 lg:self-start'>
<ToolsNav />
</aside>
</div>