Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does rewriting a URL help a search engine find the page?

My URLs look like "/pages.php?page=pageName" because I am using a database to supply the page's content. Does rewriting URLs to something like "/pageName" help search engines find the pages? If so how do I rewrite them?

like image 913
Josh Curren Avatar asked Dec 21 '25 02:12

Josh Curren


1 Answers

It probably doesn't help a crawler to find the pages, but it may have a positive impact in how it's going to rank them, as better URIs get usually better ranking (other things being equal, of course). It's also good to have them permanent.

See Cool URIs don't change

About how you have mod_rewrite in Apache world and some other options in IIS world.

Example (Apache's syntax):

RewriteEngine On
RewriteRule ^(.*)$ pages.php?page=$1

That will pass everything in the URI after the domain name (there's a caveat regarding the trailing slash) to pages.php as a page parameter.

This is

http://yourdomain.com/bears 

will return the content as served by

http://yourdomain.com/pages.php?page=bears
like image 147
Vinko Vrsalovic Avatar answered Dec 22 '25 17:12

Vinko Vrsalovic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!