Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Photon for Wordpress experience
Has anyone tried switching on the Photon for Wordpress CDN/image caching feature? If so, did you experience any problems and have you noticed any improvements?
On-Page Optimization | | pugh0 -
Product pages optimization impact on sub level domains.
How great of an impact will the optimization of product pages have an impact on a sub level domains?
On-Page Optimization | | Martin_Harris0 -
Moving a site from .cfm to Wordpress - How to keep the authority?
Hi guys, My client has a site built with Cold Fusion (web pages end in .cfm) and we're moving them over to Wordpress (for many reasons), keeping the same menu structure and navigation. Their previous SEO company was pretty awful, however, they did manage to establish some decent authority/backlinks for the website and its 20 or so pages. My questions: I assume I'll want to do 301 redirects for each page, possibly by editing the .htaccess file? Any advice on this? Anything else I need to consider in this move? Thanks!
On-Page Optimization | | alpen0 -
What's the best way to name an image for SEO?
Hi Guys,
On-Page Optimization | | krseo
I'm thinking about images and SEO. What's the best way for naming and using images in HTML Code? For example: Image-Name: keyword-keyword2-keyword3.jpg or keywordkeyword2keyword3.jpg ?
How many Keywords should I use max for a picture? And also do you use the alt tag as description of the image and the title tag or only the alt tag? If you use the title, what do you use it for? Maybe someone can copy a HTML-Code example for me 😉 Thank you 🙂
Alex0 -
Why DoFollow & NoFollow Attributes on Same Internal Text Links?
I want to know that, why SEOmoz have defined DoFollow & NoFollow attributes on same internal text links? Please, find out attachment to know more. Left bar have On-Page / Site Optimization link with dofollow attribute but, right section have nofollow. So, why should they have apply on DoFollow or NoFollow attribute on same text links? 6806571615_138b8765fd_b.jpg
On-Page Optimization | | CommercePundit0 -
Optimizing for another keyword than the menu name
Hi I would like to hear if someone could help me decide whether or not it is important regarding SEO that the menu name is the same as the keyword we want to rank for. The site is a static site and one of our most important keywords. To give an example. Our menu name is "cars" and we want to rank for "cheap rental cars".
On-Page Optimization | | KennethK0 -
Generic domain for SEO versus Brand name
I am currently building a retail e-commerce site in a highly competitive area. We have a generic brand name; e.g. kitchen-knives.com and we also have another brand name, e.g. 'slycers.com' We have 3 options that I can see and I would like to know which is better for SEO. Build generic.com as a blog site. Link to brand.com 301 redirect from generic.com to brand.com. Use generic.com as anchor text in all links 301 redirect from brand.com to generic.com . Use generic.com as anchor text in all links Also, if there are other better options, then I would appreciate the input! thanks
On-Page Optimization | | cestor0 -
Switching URL from keyword heaven to actual brand name?
Our client has a site, we'll say it's delicious-lemonade.com (That's an example.) Their brand name, however, is PowerSky. (That's an example, but the point is that it's the name of a technology, and has NOTHING to do whatsoever with being a drink. Someone would never guess what the product was, by the brand name.) The client has this domain name for a long time. The domain name itself is a top keyword for their product. We are building a new site for the client and have planned to use the brand name (PowerSky) as the primary domain, so PowerSky.com, with the product page being PowerSky.com/Delicious-Lemonade. And we are planning to redirect Delicious-Lemonade.com to PowerSky.com. However, we are concerned about the SEO hit the site is going to take. What recommendations can you make in this situation?
On-Page Optimization | | grayloon0