Kamil
Kamil

Reputation: 111

.htaccess - multiple rewrite rule for SEO purposes

I'm just watching some HTML course and there is a part about creating Pretty URLs using .htaccess file. Given example looks like that:

RewriteRule offer-creating-web-pages offer.html

As it is said in the course, we should use words separated by "-" just so Google Search Engine can read and index them as, well, separate words. And it's good to use multiple words so our page can be indexed better. But for me URL like http://example.com/offer-creating-web-pages is rather not that pretty. I would rather like to have http://example.com/offer. Here comes my question.

If I will actually use "short Pretty URL" (like /offer) and replace all links on my page with "short Pretty URLs" addresses would my page be indexed as good as if I would use "long Pretty URLs" (like /offer-creating-web-pages just because of existing proper rules in .htaccess? If so, is there a difference between this:

RewriteRule offer-creating-web-pages offer.html
RewriteRule offer offer-creating-web pages

and this:

RewriteRule offer-creating-web-pages offer.html
RewriteRule offer offer.html

? If so, which one is better?

Upvotes: 1

Views: 76

Answers (1)

Joe
Joe

Reputation: 4907

You're looking at this wrong. Both URLs are considered "pretty", they're not messy, they're simple and not complicated.

An example of a non-clean URL, would be like example.com/id/person.php?person=john

However, one of the most important things to Google (or any search engine in this matter) is that the URL & content is relevant.

So although example.com/offer is clean, it doesn't give any idea or relevance to what is actually on the page. What is the offer for? Is it an offering to Cthulhu? Is it an offer for a, I don't know, dishwasher? haha.

So the URL you've been advised to use: example.com/offer-creating-web-pages not only tells the person browsing, but it also tells Google - this is a web page that is offering services for web development.

So it's not only about the URL looking good, it needs to be relevant to the content that is on the page. I hope that helps.

Upvotes: 1

Related Questions