Solved

Simple SEO: domain url in title/page

Posted on 2006-10-23
2
205 Views
Last Modified: 2010-04-27
anyone know how to automatically insert the domain name into the <title></title> or the body of the index page
0
Comment
Question by:MasterMitch
  • 2
2 Comments
 
LVL 33

Expert Comment

by:humeniuk
ID: 17792426
This can probably be done with a server-side scripting language like PHP or ASP.  But since this is an SEO question, I have to ask why you would want to?  It seems like a waste of the title element, which is an important SEO factor.
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 250 total points
ID: 17792545
I double-checked the PHP syntax ...

$_SERVER['SERVER_NAME'] refers to the host that the page is running on.
$_SERVER['PHP_SELF'] represents the current page relative to the document root.

For the title, you would use ...

<title><?php echo $_SERVER['SERVER_NAME'],$_SERVER['PHP_SELF']; ?></title>

Here's a little example: www.humeniuk.com/ee/Q_22034907.php.

Can't help you with the ASP, though.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about the 3 stages of the buyer's journey: awareness, consideration, and decision.
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
An overview of how to create reports in Adobe Analytics (formerly Omniture Site Catalyst) using pageNames, events, eVars and props. This video will show you how to install the Omniture Debugger tool so can see (and test) what is being passed int…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question