Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
©2016AbMano
.htaccess
SEO-mæssigt
©2016AbMano
Hvad kan .htaccess?
• Oprette Redirects for gamle webadresser,
der skal sendes til den korrekte nye URL
• Forh...
©2016AbMano
301 redirect
• Henvise fra non-www. til www versionen
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.dinside....
©2016AbMano
Redirect 301 af enkelte sider
Redirect 301 /gammelt-sidenavn http://www.mitsite.dk/nyt-sidenavn
©2016AbMano
Sitehastighed
########## Begin - ETag Optimization
## This rule will create an ETag for files based only on th...
©2016AbMano
Sitehastighed /fort.
# Image files expiration: 1 month after request
ExpiresByType image/bmp "now plus 1 month...
©2016AbMano
Sitehastighed /fort.
# Audio files expiration: 1 month after request
ExpiresByType audio/basic "now plus 1 mon...
©2016AbMano
Sitehastighed /fort.
# Movie files expiration: 1 month after request
ExpiresByType application/x-shockwave-fla...
©2016AbMano
Sitehastighed - Gzip
Global Configuration / Server > Gzip Page Compression
Kræver at gzip er installeret på di...
©2016AbMano
Print, PDF og email
• Skaber duplicate content
• Skal ikke indekseres
• Indsæt i robots.txt
Disallow: /index.p...
Upcoming SlideShare
Loading in …5
×

Htaccess - SEO-mæssigt

70 views

Published on

Nogle af de ting, som du kan indsætte i din htaccess fil, hvis du vil søgemaskineoptimere din hjemmeside.

Published in: Internet
  • Be the first to comment

Htaccess - SEO-mæssigt

  1. 1. ©2016AbMano .htaccess SEO-mæssigt
  2. 2. ©2016AbMano Hvad kan .htaccess? • Oprette Redirects for gamle webadresser, der skal sendes til den korrekte nye URL • Forhindre duplicate content • Anvende brugerdefinerede fejlsider • Opsætning af din hjemmeside til at bruge en anden end index.php til landing page fil • Tilføje password beskyttelse til filer og mapper • Blokere bestemte brugere af IP-adresse
  3. 3. ©2016AbMano 301 redirect • Henvise fra non-www. til www versionen RewriteEngine On RewriteCond %{HTTP_HOST} !^www.dinside.dk$ RewriteRule (.*) http://www.dinside.dk/$1 [R=301,L] • Henvise fra www. til non-www versionen RewriteEngine On RewriteCond %{HTTP_HOST} !^dinside.dk$ RewriteRule (.*) http://dinside.dk/$1 [R=301,L]
  4. 4. ©2016AbMano Redirect 301 af enkelte sider Redirect 301 /gammelt-sidenavn http://www.mitsite.dk/nyt-sidenavn
  5. 5. ©2016AbMano Sitehastighed ########## Begin - ETag Optimization ## This rule will create an ETag for files based only on the modification ## timestamp and their size. ## Note: It may cause problems on your server and you may need to remove it FileETag MTime Size # AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future. AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript # Enable expiration control ExpiresActive On # Default expiration: 1 hour after request ExpiresDefault "now plus 1 hour" # CSS and JS expiration: 1 week after request ExpiresByType text/css "now plus 1 week" ExpiresByType application/javascript "now plus 1 week" ExpiresByType application/x-javascript "now plus 1 week" ETag fortæller browsere, når et billede allerede er downloadet og kan hentes fra den lokale browser cache i stedet fra serveren
  6. 6. ©2016AbMano Sitehastighed /fort. # Image files expiration: 1 month after request ExpiresByType image/bmp "now plus 1 month" ExpiresByType image/gif "now plus 1 month" ExpiresByType image/jpeg "now plus 1 month" ExpiresByType image/jp2 "now plus 1 month" ExpiresByType image/pipeg "now plus 1 month" ExpiresByType image/png "now plus 1 month" ExpiresByType image/svg+xml "now plus 1 month" ExpiresByType image/tiff "now plus 1 month" ExpiresByType image/vnd.microsoft.icon "now plus 1 month" ExpiresByType image/x-icon "now plus 1 month" ExpiresByType image/ico "now plus 1 month" ExpiresByType image/icon "now plus 1 month" ExpiresByType text/ico "now plus 1 month" ExpiresByType application/ico "now plus 1 month" ExpiresByType image/vnd.wap.wbmp "now plus 1 month" ExpiresByType application/vnd.wap.wbxml "now plus 1 month” ExpiresByType application/smil "now plus 1 month"
  7. 7. ©2016AbMano Sitehastighed /fort. # Audio files expiration: 1 month after request ExpiresByType audio/basic "now plus 1 month" ExpiresByType audio/mid "now plus 1 month" ExpiresByType audio/midi "now plus 1 month" ExpiresByType audio/mpeg "now plus 1 month" ExpiresByType audio/x-aiff "now plus 1 month" ExpiresByType audio/x-mpegurl "now plus 1 month" ExpiresByType audio/x-pn-realaudio "now plus 1 month" ExpiresByType audio/x-wav "now plus 1 month"
  8. 8. ©2016AbMano Sitehastighed /fort. # Movie files expiration: 1 month after request ExpiresByType application/x-shockwave-flash "now plus 1 month" ExpiresByType x-world/x-vrml "now plus 1 month" ExpiresByType video/x-msvideo "now plus 1 month" ExpiresByType video/mpeg "now plus 1 month" ExpiresByType video/mp4 "now plus 1 month" ExpiresByType video/quicktime "now plus 1 month" ExpiresByType video/x-la-asf "now plus 1 month" ExpiresByType video/x-ms-asf "now plus 1 month"
  9. 9. ©2016AbMano Sitehastighed - Gzip Global Configuration / Server > Gzip Page Compression Kræver at gzip er installeret på din server ###Enable compression using GZIP AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript
  10. 10. ©2016AbMano Print, PDF og email • Skaber duplicate content • Skal ikke indekseres • Indsæt i robots.txt Disallow: /index.php?view=article*&format=pdf Disallow: /index.php?view=article*&print=1* Disallow: /index.php?option=com_mailto* • Eller i .htaccess RewriteCond %{query_string} ^format=pdf RewriteRule (.*) http://www.domaene.dk/$1? [R=301,L]

×