Why not make that text a hyper link while you are at it...
[BUSINESS] what is best for "G" a hard link or a banner
-
Big MOE
- Verified Member

- Posts: 822
- Joined: September 24th, 2021, 7:46 am
Why not make that text a hyper link while you are at it...
Getting rich takes making money, saving a nickel will not make you rich if you never make the buck
-
CanadianChick
- Verified Member

- Posts: 1102
- Joined: April 10th, 2018, 9:07 pm
I like that idea and will start doing it
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
I would suggeat using both a banner and text. For the banner, make sure you have relevant alt text and an seo friendly filename
Creating an seo friendly filename is easier than you think and only takes a couple of mins. Lets say your /images/ folder has the following banners in :-
/images/banner01.jpg
/images/banner02.jpg
/images/banner03.jpg
Add this to your .htaccess
So this takes any url that starts with images/banner followed by any number, followed by a dash, followed by any text that is not a forward slash (/) and ending in .jpg. And then internally rewrites it to /images/banner[number].jpg. Internal rewrites DONT change the url in the browser so as far as google is concerned, your banner is called whatever you've put in the url
so for example
mywebsite.com/images/banner01-mywebsite-banner-i-can-add-any-text-in-here.jpg rewrites to mywebsite.com/images/banner01.jpg
mywebsite.com/images/banner02-this-is-more-keywords-to-describe-my-banner.jpg rewrites to mywebsite.com/images/banner02.jpg
Here's the breakdown
^images/banner = Match any url that starts with images/banner
([0-9]+) = Match any number (this is stored in variable $1 which we use in the rewrite url)
([^/]+) = Match any text that is not a forward slash / (this is stored in $2 which we dont use so it doesn't matter)
.jpg$ = Match any url that ends with .jpg
[NC,L] = NC is No Case (so case insensitive). L is Last RewriteRule (ie if this rule matches then rewrite it and don't do any more matching further down)
Creating an seo friendly filename is easier than you think and only takes a couple of mins. Lets say your /images/ folder has the following banners in :-
/images/banner01.jpg
/images/banner02.jpg
/images/banner03.jpg
Add this to your .htaccess
Code: Select all
RewriteEngine On
RewriteRule ^images/banner([0-9]+)-([^/]+).jpg$ /images/banner$1.jpg [NC,L]so for example
mywebsite.com/images/banner01-mywebsite-banner-i-can-add-any-text-in-here.jpg rewrites to mywebsite.com/images/banner01.jpg
mywebsite.com/images/banner02-this-is-more-keywords-to-describe-my-banner.jpg rewrites to mywebsite.com/images/banner02.jpg
Here's the breakdown
^images/banner = Match any url that starts with images/banner
([0-9]+) = Match any number (this is stored in variable $1 which we use in the rewrite url)
([^/]+) = Match any text that is not a forward slash / (this is stored in $2 which we dont use so it doesn't matter)
.jpg$ = Match any url that ends with .jpg
[NC,L] = NC is No Case (so case insensitive). L is Last RewriteRule (ie if this rule matches then rewrite it and don't do any more matching further down)