Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simple SEO: domain url in title/page

Posted on 2006-10-23
2
Medium Priority
?
229 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 1000 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

Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

Question has a verified solution.

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

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…
The burden of debt that average person carries today has not only increased, but it keeps on growing. It is quite common nowadays that people find it extremely difficult to make ends meet in the face of millions of competing priorities that they hav…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Suggested Courses

916 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